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
500
sveltejs__svelte-500
['498', '498']
61cbd4fa9702077122ea6672552ee4b522b74846
diff --git a/src/generators/dom/visitors/Element/Binding.js b/src/generators/dom/visitors/Element/Binding.js --- a/src/generators/dom/visitors/Element/Binding.js +++ b/src/generators/dom/visitors/Element/Binding.js @@ -4,7 +4,7 @@ import getSetter from '../shared/binding/getSetter.js'; import getStaticAttributeValue f...
diff --git a/test/runtime/samples/binding-input-checkbox-group-outside-each/_config.js b/test/runtime/samples/binding-input-checkbox-group-outside-each/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/binding-input-checkbox-group-outside-each/_config.js @@ -0,0 +1,78 @@ +const values = [ + { nam...
Grouped checkbox bindings behaving badly [REPL](https://svelte.technology/repl?version=1.16.0&gist=067127646900e0e6e979e6ca64f9bbd5). Selecting a checkbox shouldn't deselect others in the group. Grouped checkbox bindings behaving badly [REPL](https://svelte.technology/repl?version=1.16.0&gist=067127646900e0e6e979e6ca64...
2017-04-19 02:12:28+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
['parse binding', 'validate import-root', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', 'sourcemaps basic', ...
['runtime shared helpers binding-input-checkbox-group-outside-each', 'runtime inline helpers binding-input-checkbox-group-outside-each']
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/visitors/Element/Binding.js->program->function_declaration:visitBinding"]
sveltejs/svelte
501
sveltejs__svelte-501
['498']
61cbd4fa9702077122ea6672552ee4b522b74846
diff --git a/src/generators/dom/visitors/EachBlock.js b/src/generators/dom/visitors/EachBlock.js --- a/src/generators/dom/visitors/EachBlock.js +++ b/src/generators/dom/visitors/EachBlock.js @@ -57,16 +57,28 @@ export default function visitEachBlock ( generator, block, state, node ) { } ` ); - block.builders....
diff --git a/test/runtime/samples/binding-input-checkbox-group-outside-each/_config.js b/test/runtime/samples/binding-input-checkbox-group-outside-each/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/binding-input-checkbox-group-outside-each/_config.js @@ -0,0 +1,78 @@ +const values = [ + { nam...
Grouped checkbox bindings behaving badly [REPL](https://svelte.technology/repl?version=1.16.0&gist=067127646900e0e6e979e6ca64f9bbd5). Selecting a checkbox shouldn't deselect others in the group.
null
2017-04-19 02:22: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
['parse binding', 'validate import-root', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', 'sourcemaps basic', ...
['runtime shared helpers binding-input-checkbox-group-outside-each', 'runtime shared helpers each-block-dynamic-else-static', 'runtime inline helpers binding-input-checkbox-group-outside-each', 'runtime inline helpers each-block-dynamic-else-static']
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/dom/visitors/EachBlock.js->program->function_declaration:visitEachBlock", "src/generators/dom/visitors/Element/Binding.js->program->function_declaration:visitBinding"]
sveltejs/svelte
510
sveltejs__svelte-510
['509']
4012414fa733628bb029be39195a278301da46be
diff --git a/src/generators/dom/visitors/EachBlock.js b/src/generators/dom/visitors/EachBlock.js --- a/src/generators/dom/visitors/EachBlock.js +++ b/src/generators/dom/visitors/EachBlock.js @@ -66,12 +66,16 @@ export default function visitEachBlock ( generator, block, state, node ) { ${each_block_else}.mount( ${...
diff --git a/test/runtime/samples/each-block-dynamic-else-static/_config.js b/test/runtime/samples/each-block-dynamic-else-static/_config.js --- a/test/runtime/samples/each-block-dynamic-else-static/_config.js +++ b/test/runtime/samples/each-block-dynamic-else-static/_config.js @@ -23,5 +23,10 @@ export default { as...
Static else block references should be nulled out [REPL](https://svelte.technology/repl?version=1.17.0&gist=2d001621f22badcc9d6f596b4163f559) — the reference to the removed else block needs to be nulled out: ```diff if ( each_block_value.length ) { - if ( each_block_else ) each_block_else.destroy( true ); + if ...
null
2017-04-19 14:40: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 shared helpers select-bind-array', 'parse binding', 'validate import-root', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime i...
['runtime shared helpers each-block-dynamic-else-static', 'runtime inline helpers each-block-dynamic-else-static']
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/visitors/EachBlock.js->program->function_declaration:visitEachBlock"]
sveltejs/svelte
515
sveltejs__svelte-515
['514']
1fd3c21194e19294ca038c88850da1c982a47647
diff --git a/src/generators/dom/visitors/Component/Component.js b/src/generators/dom/visitors/Component/Component.js --- a/src/generators/dom/visitors/Component/Component.js +++ b/src/generators/dom/visitors/Component/Component.js @@ -113,9 +113,11 @@ export default function visitComponent ( generator, block, state, no...
diff --git a/test/runtime/samples/component-yield-static/Widget.html b/test/runtime/samples/component-yield-static/Widget.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-yield-static/Widget.html @@ -0,0 +1 @@ +<b>{{yield}}</b> diff --git a/test/runtime/samples/component-yield-static/_config...
Nested component with static content calls `.update` without defining it https://svelte.technology/repl?version=1.17.0&gist=68c7bc6624a41a4ae77435cb2ac9555e If a nested component is being pass just static HTML, its fragment won't have an `update` method - but the `update` method for the containing fragment will stil...
null
2017-04-20 09:56:42+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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['runtime inline helpers component-yield-static', 'runtime shared helpers component-yield-static']
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/visitors/Component/Component.js->program->function_declaration:visitComponent"]
sveltejs/svelte
517
sveltejs__svelte-517
['516']
3dafc39a0525156aae4c491c854c82feef34d0c5
diff --git a/src/generators/dom/visitors/Element/Element.js b/src/generators/dom/visitors/Element/Element.js --- a/src/generators/dom/visitors/Element/Element.js +++ b/src/generators/dom/visitors/Element/Element.js @@ -34,7 +34,7 @@ export default function visitElement ( generator, block, state, node ) { return visi...
diff --git a/test/runtime/samples/element-invalid-name/_config.js b/test/runtime/samples/element-invalid-name/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/element-invalid-name/_config.js @@ -0,0 +1,5 @@ +export default { + html: ` + <foo-bar>Hello</foo-bar> + ` +} diff --git a/test/runtime/...
Svelte creates invalid javascript when using custom element tags in templates https://svelte.technology/repl?version=1.17.1&gist=6c5f1de11d08d968522b9f0da902725a It seems to be trying to create something like the following code: ```var custom-element = createElement( 'custom-element' );``` <details> Uncaught ...
null
2017-04-20 18:55: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['runtime shared helpers element-invalid-name', 'runtime inline helpers element-invalid-name']
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/dom/visitors/Element/Element.js->program->function_declaration:visitElement", "src/generators/dom/visitors/Element/Element.js->program->function_declaration:getRenderStatement"]
sveltejs/svelte
526
sveltejs__svelte-526
['523']
9427f63b95d8154bc00c7334ec1f48b1872da291
diff --git a/src/validate/html/validateElement.js b/src/validate/html/validateElement.js --- a/src/validate/html/validateElement.js +++ b/src/validate/html/validateElement.js @@ -1,5 +1,11 @@ import flattenReference from '../../utils/flattenReference.js'; +const validBuiltins = new Set([ + 'set', + 'fire', + 'destro...
diff --git a/test/runtime/samples/event-handler-destroy/_config.js b/test/runtime/samples/event-handler-destroy/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/event-handler-destroy/_config.js @@ -0,0 +1,20 @@ +export default { + html: ` + <button>destroy</button> + `, + + test ( assert, compo...
`destroy` not a valid callee [The example given in the guide for yield elements](https://svelte.technology/repl?data=JTdCJTIyZ2lzdCUyMiUzQW51bGwlMkMlMjJjb21wb25lbnRzJTIyJTNBJTVCJTdCJTIybmFtZSUyMiUzQSUyMkFwcCUyMiUyQyUyMnNvdXJjZSUyMiUzQSUyMiU3QiU3QiUyM2lmJTIwc2hvd01vZGFsJTdEJTdEJTVDbiU1Q3QlM0NNb2RhbCUyMG9uJTNBZGVzdHJveSU...
Good catch — PR inbound
2017-04-25 20:34: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['runtime inline helpers event-handler-destroy', 'runtime shared helpers event-handler-destroy', 'validate method-nonexistent', 'validate method-nonexistent-helper', 'ssr event-handler-destroy']
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.js->program->function_declaration:validateElement"]
sveltejs/svelte
533
sveltejs__svelte-533
['532']
8e87c688aee1d5f6a3b0121854dd12d43722d295
diff --git a/src/generators/dom/visitors/IfBlock.js b/src/generators/dom/visitors/IfBlock.js --- a/src/generators/dom/visitors/IfBlock.js +++ b/src/generators/dom/visitors/IfBlock.js @@ -68,7 +68,7 @@ export default function visitIfBlock ( generator, block, state, node ) { function simple ( generator, block, state, ...
diff --git a/test/js/samples/if-block-simple/expected.js b/test/js/samples/if-block-simple/expected.js --- a/test/js/samples/if-block-simple/expected.js +++ b/test/js/samples/if-block-simple/expected.js @@ -3,7 +3,7 @@ import { appendNode, assign, createComment, createElement, createText, detachNod function create_mai...
Using `||` in an if statement error Using `||` in an `{{#if}}` statement results in an error: "if_block.mount is not a function" [https://svelte.technology/repl?version=1.18.1&gist=5d0b636c8f48d7adf2dec15ba5e2fbe6](https://svelte.technology/repl?version=1.18.1&gist=5d0b636c8f48d7adf2dec15ba5e2fbe6)
On line 4 we need parenthesis around ``` state.name || state.foo === "bar" ```
2017-04-28 02:59: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['runtime shared helpers if-block-or', 'runtime inline helpers if-block-or', 'js if-block-simple', 'js use-elements-as-anchors']
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/dom/visitors/IfBlock.js->program->function_declaration:compound", "src/generators/dom/visitors/IfBlock.js->program->function_declaration:simple"]
sveltejs/svelte
536
sveltejs__svelte-536
['534']
8e87c688aee1d5f6a3b0121854dd12d43722d295
diff --git a/src/parse/read/expression.js b/src/parse/read/expression.js --- a/src/parse/read/expression.js +++ b/src/parse/read/expression.js @@ -34,7 +34,7 @@ export default function readExpression ( parser ) { parser.index = start; try { - const node = parseExpressionAt( parser.template, parser.index ); + co...
diff --git a/test/runtime/samples/paren-wrapped-expressions/_config.js b/test/runtime/samples/paren-wrapped-expressions/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/paren-wrapped-expressions/_config.js @@ -0,0 +1,16 @@ +export default { + data: { + a: 'foo', + b: true, + c: [ 1, 2, 3 ], +...
Parser does not accept if or each block argument in parentheses Attempting to parse `{{#if (condition)}}...{{/if}}` results in an `Expected }}` parsing error at the `)`. And attempting to parse `{{#each (list) as item}}...{{/each}}` results in an `Expected as` parsing error at the `)`.
Looks like this affects regular mustaches as well. `{{(a)}}` fails to parse. Not sure whether this is a bug in Acorn, or just something about their API I'm not understanding. `acorn.parseExpressionAt('{{(a)}}', 2)` returns `{ type: 'Identifier', start: 3, end: 4, name: 'a' }`. I suppose this makes sense from Acorn's...
2017-04-30 02:54:20+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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['ssr paren-wrapped-expressions', 'runtime shared helpers paren-wrapped-expressions', 'runtime inline helpers paren-wrapped-expressions']
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/read/expression.js->program->function_declaration:readExpression"]
sveltejs/svelte
542
sveltejs__svelte-542
['539']
a2ce4a4628eb376f81cb86ff9496598fed873c85
diff --git a/src/generators/dom/visitors/Element/Binding.js b/src/generators/dom/visitors/Element/Binding.js --- a/src/generators/dom/visitors/Element/Binding.js +++ b/src/generators/dom/visitors/Element/Binding.js @@ -30,7 +30,7 @@ export default function visitBinding ( generator, block, state, node, attribute // <s...
diff --git a/test/runtime/samples/binding-select-initial-value/_config.js b/test/runtime/samples/binding-select-initial-value/_config.js --- a/test/runtime/samples/binding-select-initial-value/_config.js +++ b/test/runtime/samples/binding-select-initial-value/_config.js @@ -1,6 +1,4 @@ export default { - skip: true, /...
Use `querySelector(':checked')` instead of `selectedOptions` From [Gitter](https://gitter.im/sveltejs/svelte?at=59061335d32c6f2f0955d234) — it seems `selectedOptions` isn't supported in IE, and using `querySelector` means we could enable `<select>` tests without waiting for a new version of JSDOM. [This is the relev...
I believe I'll have time to submit a PR for this tomorrow. Some of the disabled tests need minor tweaks to pass (not directly related to the selectedOptions/:checked-replacement).
2017-05-01 19:06:20+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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['runtime inline helpers select-change-handler', 'runtime shared helpers select-change-handler']
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/dom/visitors/Element/Binding.js->program->function_declaration:getBindingValue", "src/generators/dom/visitors/Element/Binding.js->program->function_declaration:visitBinding"]
sveltejs/svelte
555
sveltejs__svelte-555
['554']
fb7af38eb8b888d466795e7b4bccf1e80edcc09b
diff --git a/src/generators/dom/index.js b/src/generators/dom/index.js --- a/src/generators/dom/index.js +++ b/src/generators/dom/index.js @@ -117,13 +117,11 @@ export default function dom ( parsed, source, options ) { if ( generator.css && options.css !== false ) { builders.main.addBlock( deindent` - var ${ge...
diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -8,13 +8,11 @@ var template = (function () { }; }()...
Document state should determine whether the CSS has been added Svelte components add their stylesheets to ```document.head``` once per component type. Whether the stylesheet has already been added is currently determined by a private variable ```added_css``` inside the component module. While in most cases, this flag s...
null
2017-05-03 18:32: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['js collapses-text-around-comments']
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/index.js->program->function_declaration:dom"]
sveltejs/svelte
556
sveltejs__svelte-556
['540']
c712ad502a07d653b6a5e9e1934bbfd576757c3d
diff --git a/src/generators/dom/visitors/IfBlock.js b/src/generators/dom/visitors/IfBlock.js --- a/src/generators/dom/visitors/IfBlock.js +++ b/src/generators/dom/visitors/IfBlock.js @@ -5,6 +5,10 @@ function isElseIf ( node ) { return node && node.children.length === 1 && node.children[0].type === 'IfBlock'; } +f...
diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js --- a/test/js/samples/if-block-no-update/expected.js +++ b/test/js/samples/if-block-no-update/expected.js @@ -9,24 +9,24 @@ function create_main_fragment ( state, component ) { } var current_block = get_bl...
Remove unnecessary `current_block &&` Very minor thing I noticed while working on #525 — if you have an `if` block (or a chain of if, elseif, elseif...) followed by an `else` block, then there's no need to check for the existence of `current_block`: ```diff function get_block ( state ) { if ( state.foo ) return ...
null
2017-05-03 21:31: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['js if-block-no-update']
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/generators/dom/visitors/IfBlock.js->program->function_declaration:compoundWithOutros", "src/generators/dom/visitors/IfBlock.js->program->function_declaration:compound", "src/generators/dom/visitors/IfBlock.js->program->function_declaration:isElseBranch", "src/generators/dom/visitors/IfBlock.js->program->function_...
sveltejs/svelte
560
sveltejs__svelte-560
['546']
c712ad502a07d653b6a5e9e1934bbfd576757c3d
diff --git a/src/generators/dom/visitors/Element/addTransitions.js b/src/generators/dom/visitors/Element/addTransitions.js --- a/src/generators/dom/visitors/Element/addTransitions.js +++ b/src/generators/dom/visitors/Element/addTransitions.js @@ -40,7 +40,10 @@ export default function addTransitions ( generator, block,...
diff --git a/test/runtime/samples/transition-js-each-block-intro-outro/_config.js b/test/runtime/samples/transition-js-each-block-intro-outro/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/transition-js-each-block-intro-outro/_config.js @@ -0,0 +1,43 @@ +export default { + data: { + visible: ...
Outros aren't correctly aborted State is getting corrupted in this example: ![barchart-glitch](https://cloud.githubusercontent.com/assets/1162160/25595722/dbc946d2-2e93-11e7-8d9a-060a8d802cab.gif) [REPL](https://svelte.technology/repl?version=1.18.2&gist=9dd404e533a3c2139aa328e3342b6a9d) (though it will just give...
null
2017-05-04 02:16: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['runtime shared helpers transition-js-each-block-intro-outro', 'runtime inline helpers transition-js-each-block-intro-outro']
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/dom/visitors/Element/addTransitions.js->program->function_declaration:addTransitions", "src/shared/transitions.js->program->function_declaration:wrapTransition"]
sveltejs/svelte
563
sveltejs__svelte-563
['561', '561']
3a7f7e29c2b0e98d026f97594640ba7b39dd0537
diff --git a/src/generators/dom/visitors/YieldTag.js b/src/generators/dom/visitors/YieldTag.js --- a/src/generators/dom/visitors/YieldTag.js +++ b/src/generators/dom/visitors/YieldTag.js @@ -1,9 +1,11 @@ export default function visitYieldTag ( generator, block, state ) { - block.builders.mount.addLine( - `${block.com...
diff --git a/test/runtime/samples/component-yield-placement/Modal.html b/test/runtime/samples/component-yield-placement/Modal.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-yield-placement/Modal.html @@ -0,0 +1,6 @@ +<div class='modal-background' on:click='destroy()'></div> + +<div class='...
{{Yield}} content isn't injected in the correct place per docs https://svelte.technology/guide#yield-tags: The button below appears ***above*** the yielded content instead of below it ``` <div class='modal'> {{yield}} <!-- content is injected here --> <button on:click='destroy()'>close modal</button> </div> ...
This looks related to the changes in 1.18.0 for #3. It's a bit hard to tell what's going on the in REPL because there seem to be some other bugs in the REPL surfacing as I look at this. But I'm fairly certain the code being generated is actually wrong. The code creates the div and places the button in it: ```javascr...
2017-05-04 13:34: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['runtime inline helpers component-yield-placement', 'runtime shared helpers component-yield-placement']
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/visitors/YieldTag.js->program->function_declaration:visitYieldTag"]
sveltejs/svelte
566
sveltejs__svelte-566
['564']
90d2e7f883ef5c546310deb080461d303fae02e2
diff --git a/src/validate/html/validateElement.js b/src/validate/html/validateElement.js --- a/src/validate/html/validateElement.js +++ b/src/validate/html/validateElement.js @@ -3,6 +3,10 @@ import validateEventHandler from './validateEventHandler.js'; export default function validateElement ( validator, node ) { c...
diff --git a/test/validator/samples/transition-duplicate-in-transition/errors.json b/test/validator/samples/transition-duplicate-in-transition/errors.json new file mode 100644 --- /dev/null +++ b/test/validator/samples/transition-duplicate-in-transition/errors.json @@ -0,0 +1,8 @@ +[{ + "message": "An element cannot ha...
Transition validation We need to check that 1. there are no duplication `in` or `out` directives 2. if there is a `transition` directive, there are no `in` or `out` directives 3. the transition itself is present on the `transitions` property 4. the parameters are valid (a single expression), though I think that p...
null
2017-05-04 18:07:21+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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['validate transition-duplicate-transition-in', 'validate transition-duplicate-out-transition', 'validate transition-duplicate-transition', 'validate transition-duplicate-transition-out', 'validate transition-duplicate-out', 'validate transition-duplicate-in-transition', 'validate transition-missing', 'validate transit...
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/validate/js/index.js->program->function_declaration:validateJs", "src/validate/index.js->program->function_declaration:validate", "src/validate/html/validateElement.js->program->function_declaration:validateElement"]
sveltejs/svelte
567
sveltejs__svelte-567
['562', '562']
90d2e7f883ef5c546310deb080461d303fae02e2
diff --git a/src/generators/dom/visitors/Element/addTransitions.js b/src/generators/dom/visitors/Element/addTransitions.js --- a/src/generators/dom/visitors/Element/addTransitions.js +++ b/src/generators/dom/visitors/Element/addTransitions.js @@ -14,14 +14,14 @@ export default function addTransitions ( generator, block...
diff --git a/test/runtime/samples/transition-js-delay-in-out/_config.js b/test/runtime/samples/transition-js-delay-in-out/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/transition-js-delay-in-out/_config.js @@ -0,0 +1,24 @@ +export default { + test ( assert, component, target, window, raf ) { ...
Delays not being applied Think I just forgot to implement this ([REPL](https://svelte.technology/repl?version=1.19.1&gist=ab8155d6c3b0705d31c1bc1874d8d168)). It does raise a question though — if a *bidirectional* transition has a delay, should it apply if a transition is aborted, or only for fresh transitions? I.e. ...
2017-05-04 21:59: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['runtime shared helpers transition-js-delay', 'runtime shared helpers transition-js-delay-in-out', 'runtime inline helpers transition-js-delay', 'runtime inline helpers transition-js-delay-in-out']
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/dom/visitors/Element/addTransitions.js->program->function_declaration:addTransitions", "src/shared/transitions.js->program->function_declaration:wrapTransition"]
sveltejs/svelte
571
sveltejs__svelte-571
['569']
90a67d26c0bc01a0c8d0bf2c2e2b09120f8ad9d3
diff --git a/src/generators/dom/visitors/IfBlock.js b/src/generators/dom/visitors/IfBlock.js --- a/src/generators/dom/visitors/IfBlock.js +++ b/src/generators/dom/visitors/IfBlock.js @@ -52,13 +52,7 @@ export default function visitIfBlock ( generator, block, state, node ) { const anchor = node.needsAnchor ? block.get...
diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js --- a/test/js/samples/if-block-no-update/expected.js +++ b/test/js/samples/if-block-no-update/expected.js @@ -1,8 +1,6 @@ import { appendNode, assign, createComment, createElement, createText, detachNode, dispa...
When state changes, nested components containing conditionals jump over other elements Reproduced in 1.19.1. When a template contains an `if`, and inside of that there is a nested component that contains another `if`, when the state changes the elements of the nested component will jump to the end of the containing ...
Worth pointing out that this only occurs within the nested, truthy if-block. On the example's re-render, it self-heals to `Wat's up doooog ?` It's still wrong for me on every re-render - it's only on the initial render that I see the nested component rendered in the right place. No matter what I change the state to af...
2017-05-06 20:04: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['js if-block-simple', 'js if-block-no-update', 'js use-elements-as-anchors', 'runtime inline helpers component-if-placement', 'runtime shared helpers component-if-placement']
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/dom/visitors/IfBlock.js->program->function_declaration:compoundWithOutros", "src/generators/dom/visitors/IfBlock.js->program->function_declaration:compound", "src/generators/dom/visitors/IfBlock.js->program->function_declaration:visitIfBlock", "src/generators/dom/visitors/IfBlock.js->program->function_...
sveltejs/svelte
580
sveltejs__svelte-580
['579']
4e58bd06ff41ab908b5971554db83f444e0d8a83
diff --git a/src/validate/html/validateEventHandler.js b/src/validate/html/validateEventHandler.js --- a/src/validate/html/validateEventHandler.js +++ b/src/validate/html/validateEventHandler.js @@ -31,5 +31,5 @@ export default function validateEventHandlerCallee ( validator, attribute ) { message += `. '${callee.na...
diff --git a/test/validator/samples/method-nonexistent-helper/errors.json b/test/validator/samples/method-nonexistent-helper/warnings.json similarity index 100% rename from test/validator/samples/method-nonexistent-helper/errors.json rename to test/validator/samples/method-nonexistent-helper/warnings.json diff --git a/...
Unnecessary error during build: "invalid callee" I'm adding some methods at instantiation-time, ala #284. This now causes an error at build-time: `Error: '[method name]' is an invalid callee (should be one of this.*, event.*, set, fire, destroy, complete or restore) while parsing file: [filename]` This should pro...
null
2017-05-10 12:10: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['validate method-nonexistent-helper', 'validate method-nonexistent', 'validate window-event-invalid']
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/validateEventHandler.js->program->function_declaration:validateEventHandlerCallee"]
sveltejs/svelte
591
sveltejs__svelte-591
['590']
4e58bd06ff41ab908b5971554db83f444e0d8a83
diff --git a/src/generators/dom/visitors/Element/Element.js b/src/generators/dom/visitors/Element/Element.js --- a/src/generators/dom/visitors/Element/Element.js +++ b/src/generators/dom/visitors/Element/Element.js @@ -46,7 +46,7 @@ export default function visitElement ( generator, block, state, node ) { block.build...
diff --git a/test/runtime/samples/select-props/_config.js b/test/runtime/samples/select-props/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/select-props/_config.js @@ -0,0 +1,15 @@ +export default { + test ( assert, component, target, window ) { + const selects = document.querySelectorAll( '...
#each+<select>+on:change are not working You can see this bug here: https://svelte.technology/repl?gist=1c4a9db0b3ce319f4e893138e5a6398d list0 - on:change is working without problems lists inside #each block - on:change is not working (Uncaught TypeError: Cannot read property 'component' of undefined at HTML...
This looks related to my changes in #521. `childState.allUsedContexts` and `childState.usesComponent` apparently aren't getting updated in time when we're deferring visiting all of the `<select>` element's attributes - and so we don't generate the code that initializes or updates the values in `_svelte` on the element.
2017-05-19 02:21: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['runtime inline helpers select-props', 'runtime shared helpers select-props']
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/dom/visitors/Element/Element.js->program->function_declaration:visitElement", "src/generators/dom/visitors/Element/Element.js->program->function_declaration:visitElement->function_declaration:visitAttributes", "src/generators/dom/visitors/Element/Element.js->program->function_declaration:visitElement->...
sveltejs/svelte
597
sveltejs__svelte-597
['593', '593']
1e14a6265440611cad4fe371717003a5d4d5a092
diff --git a/src/generators/dom/shared.ts b/src/generators/dom/shared.ts --- a/src/generators/dom/shared.ts +++ b/src/generators/dom/shared.ts @@ -29,7 +29,7 @@ export default { "linear": "function linear ( t ) {\n\treturn t;\n}", "generateKeyframes": "function generateKeyframes ( a, b, delta, duration, ease, fn, n...
diff --git a/test/js/index.js b/test/js/index.js --- a/test/js/index.js +++ b/test/js/index.js @@ -1,6 +1,7 @@ import assert from 'assert'; import * as fs from 'fs'; import * as path from 'path'; +import { rollup } from 'rollup'; import { svelte } from '../helpers.js'; describe( 'js', () => { @@ -31,11 +32,31 @@...
Using Rollup with shared helpers always includes transitionManager This is probably technically in Rollup's court, but if there's anything we can do here to make the bundler behave better, that would be nice to do. If you import any of the helpers in `shared.js` and bundle with Rollup with default settings, the `tra...
Ah, curses. Rollup should be detecting and removing that. It might need to be written in a slightly different way. Ideally Butternut would also detect and remove it, but the earlier it happens in the process the better. Ah, curses. Rollup should be detecting and removing that. It might need to be written in a slight...
2017-05-27 14:00: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['js if-block-simple', 'js if-block-no-update', 'js onrender-onteardown-rewritten', 'js event-handlers-custom', 'js each-block-changed-check', 'js non-imported-component', 'js use-elements-as-anchors', 'js collapses-text-around-comments', 'js computed-collapsed-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
Refactoring
true
false
false
false
0
0
0
false
false
[]
sveltejs/svelte
599
sveltejs__svelte-599
['582']
4f56b6553c098c3b4852b797785472387703d6fc
diff --git a/src/generators/dom/visitors/Element/Element.ts b/src/generators/dom/visitors/Element/Element.ts --- a/src/generators/dom/visitors/Element/Element.ts +++ b/src/generators/dom/visitors/Element/Element.ts @@ -107,6 +107,20 @@ export default function visitElement ( generator: DomGenerator, block: Block, st }...
diff --git a/test/parser/samples/textarea-children/input.html b/test/parser/samples/textarea-children/input.html new file mode 100644 --- /dev/null +++ b/test/parser/samples/textarea-children/input.html @@ -0,0 +1,3 @@ +<textarea> + <p>not actually an element. {{foo}}</p> +</textarea> \ No newline at end of file diff -...
<textarea value='{{foo}}'> doesn't work [Repro here](https://svelte.technology/repl?version=1.20.2&gist=703b45513de90fe93bb47eafc61b3f8b) — the generated code is wrong: ```diff if ( textarea_value_value !== ( textarea_value_value = state.foo ) ) { - setAttribute( textarea, 'value', textarea_value_value ); + tex...
`<textarea>{{foo}}</textarea>` works, doesn't it? I'm not sure why we'd want to support `<textarea value='{{foo}}>` when `<textarea value='some text'>` doesn't work in regular HTML. I might be being overly pedantic. Because the way that you update the contents of a textarea is with `textarea.value = content` - I'd argu...
2017-05-27 16:48:27+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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['runtime shared helpers textarea-value', 'runtime inline helpers textarea-children', 'runtime inline helpers textarea-value', 'runtime shared helpers textarea-children', 'validate textarea-value-children', 'parse textarea-children', 'ssr textarea-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
8
0
8
false
false
["src/parse/state/tag.ts->program->function_declaration:readSequence", "src/parse/state/tag.ts->program->function_declaration:tag", "src/generators/server-side-rendering/visitors/Element.ts->program->function_declaration:stringifyAttributeValue", "src/parse/state/tag.ts->program->function_declaration:getShorthandValue"...
sveltejs/svelte
600
sveltejs__svelte-600
['575']
4f56b6553c098c3b4852b797785472387703d6fc
diff --git a/src/generators/Generator.ts b/src/generators/Generator.ts --- a/src/generators/Generator.ts +++ b/src/generators/Generator.ts @@ -117,11 +117,7 @@ export default class Generator { const { name } = flattenReference( node ); if ( scope.has( name ) ) return; - if ( parent && parent.type === ...
diff --git a/test/runtime/samples/helpers-not-call-expression/_config.js b/test/runtime/samples/helpers-not-call-expression/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/helpers-not-call-expression/_config.js @@ -0,0 +1,3 @@ +export default { + html: '<p>1,4,9</p>' +}; diff --git a/test/runti...
Can't access easing functions from helpers This... ```html <div in:fly='{x: -200, easing: elasticOut}'> wheee!!!! </div> <script> import fly from 'svelte-transitions-fly'; import { elasticOut } from 'eases-jsnext'; export default { helpers: { elasticOut }, transitions: { fly } }; </s...
null
2017-05-27 17:23: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['validate helper-clash-context', 'runtime inline helpers helpers-not-call-expression', 'ssr helpers-not-call-expression', 'runtime shared helpers helpers-not-call-expression']
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/Generator.ts->program->class_declaration:Generator->method_definition:contextualise->method_definition:enter", "src/validate/html/index.ts->program->function_declaration:validateHtml->function_declaration:visit"]
sveltejs/svelte
601
sveltejs__svelte-601
['574']
3e30b755a3f8acceae0ec186a50387d4015eca66
diff --git a/.gitignore b/.gitignore --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ coverage.lcov test/sourcemaps/samples/*/output.js test/sourcemaps/samples/*/output.js.map _actual.* +src/generators/dom/shared.ts \ No newline at end of file diff --git a/src/generators/dom/shared.ts b/src/generators/dom/shared....
diff --git a/test/runtime/samples/transition-css-delay/_config.js b/test/runtime/samples/transition-css-delay/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/transition-css-delay/_config.js @@ -0,0 +1,12 @@ +export default { + test ( assert, component, target, window, raf ) { + component.set({...
Delay on CSS transitions causes glitches The CSS needs to be applied immediately (in [shared/transitions.js](https://github.com/sveltejs/svelte/blob/cfd5d3e3c78fc3ea5929d24edf65c748047e2803/src/shared/transitions.js#L40)) if there's a delay: ```diff -if ( intro && obj.tick ) obj.tick( 0 ); +if ( intro ) { + if (...
null
2017-05-27 17:50: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['runtime inline helpers transition-css-delay', 'runtime shared helpers transition-css-delay']
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
605
sveltejs__svelte-605
['602', '602']
79d3c44785fcec59901ae6639334deafa4d7448d
diff --git a/src/generators/dom/visitors/Component/Binding.ts b/src/generators/dom/visitors/Component/Binding.ts --- a/src/generators/dom/visitors/Component/Binding.ts +++ b/src/generators/dom/visitors/Component/Binding.ts @@ -39,7 +39,7 @@ export default function visitBinding ( generator: DomGenerator, block: Block, s...
diff --git a/test/parser/samples/error-binding-rvalue/error.json b/test/parser/samples/error-binding-rvalue/error.json new file mode 100644 --- /dev/null +++ b/test/parser/samples/error-binding-rvalue/error.json @@ -0,0 +1,8 @@ +{ + "message": "Cannot bind to rvalue", + "pos": 19, + "loc": { + "line": 1, + "column": ...
Compiler error "Cannot read property 'name' of null" with two-way-binding + brackets Svelte version 1.20.2 Template snippet: ```html <input type='checkbox' bind:checked='todo["done"]'> ``` Expected behavior: should compile as happily as if I had used `bind:checked='todo.done'` Observed behavior: compiler ...
2017-05-28 20:02: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['runtime inline helpers binding-input-text-deep-computed', 'parse error-binding-rvalue', 'runtime inline helpers binding-input-text-deep-contextual-computed-dynamic', 'runtime shared helpers binding-input-text-deep-computed', 'runtime shared helpers binding-input-text-deep-computed-dynamic', 'runtime shared helpers bi...
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
7
0
7
false
false
["src/parse/read/directives.ts->program->function_declaration:readBindingDirective", "src/generators/dom/visitors/Element/Binding.ts->program->function_declaration:getObject", "src/generators/dom/visitors/Element/Binding.ts->program->function_declaration:visitBinding", "src/generators/dom/visitors/shared/binding/getSet...
sveltejs/svelte
606
sveltejs__svelte-606
['584', '584']
79d3c44785fcec59901ae6639334deafa4d7448d
diff --git a/src/generators/dom/visitors/Element/Binding.ts b/src/generators/dom/visitors/Element/Binding.ts --- a/src/generators/dom/visitors/Element/Binding.ts +++ b/src/generators/dom/visitors/Element/Binding.ts @@ -183,7 +183,7 @@ function getBindingValue ( generator: DomGenerator, block: Block, state: State, /...
diff --git a/test/runtime/samples/binding-input-number/_config.js b/test/runtime/samples/binding-input-number/_config.js --- a/test/runtime/samples/binding-input-number/_config.js +++ b/test/runtime/samples/binding-input-number/_config.js @@ -29,5 +29,15 @@ export default { <input type='number'> <p>number 44</p...
For input[type=number] bound value not equal event value <!-- 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://...
[Here](https://github.com/sveltejs/svelte/blob/552c62aa56270d39fb9ef828c4363375565bdf77/src/generators/dom/visitors/Element/Binding.js#L182)'s where `type='range'` and `'type='number'` bound input values are getting converted to numbers. This was introduced in #436. I'm honestly not sure what the best path is here. Hav...
2017-05-28 22:00: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['runtime shared helpers binding-input-number', 'runtime inline helpers binding-input-number']
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/dom.js->program->function_declaration:getBindingGroupValue", "src/shared/dom.js->program->function_declaration:toNumber", "src/generators/dom/visitors/Element/Binding.ts->program->function_declaration:getBindingValue"]
sveltejs/svelte
611
sveltejs__svelte-611
['610']
a538f7a07107056eb831bece80263de4b6bbe24d
diff --git a/src/generators/dom/visitors/EachBlock.ts b/src/generators/dom/visitors/EachBlock.ts --- a/src/generators/dom/visitors/EachBlock.ts +++ b/src/generators/dom/visitors/EachBlock.ts @@ -139,7 +139,7 @@ function keyed ( generator: DomGenerator, block: Block, state: State, node: Node block.builders.mount.addB...
diff --git a/test/js/samples/each-block-changed-check/_actual-bundle.js b/test/js/samples/each-block-changed-check/_actual-bundle.js --- a/test/js/samples/each-block-changed-check/_actual-bundle.js +++ b/test/js/samples/each-block-changed-check/_actual-bundle.js @@ -153,7 +153,7 @@ function create_main_fragment ( state...
DOM elements being prepended rather than appended with each block [Repro](https://svelte.technology/repl?version=1.21.0&gist=a2f4545bbdb3ca5f6b562d27ad278706) — haven't looked any further into the cause yet.
I think [this](https://svelte.technology/repl?version=1.21.0&gist=d2a2dd0e01c3d3f62199413bcc6a2b51) example much better. [Simpler still](https://svelte.technology/repl?version=1.21.0&gist=a3436f714e161162e9c2a480a286c363) — remove the `<div>` and it goes even more haywire
2017-06-01 02:07: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 shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ...
['js each-block-changed-check']
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/dom/visitors/EachBlock.ts->program->function_declaration:keyed", "src/generators/dom/visitors/EachBlock.ts->program->function_declaration:unkeyed"]
sveltejs/svelte
613
sveltejs__svelte-613
['612']
e8c190770968848edb2a41274b5e251cb5e87a79
diff --git a/src/generators/dom/visitors/Element/EventHandler.ts b/src/generators/dom/visitors/Element/EventHandler.ts --- a/src/generators/dom/visitors/Element/EventHandler.ts +++ b/src/generators/dom/visitors/Element/EventHandler.ts @@ -47,9 +47,7 @@ export default function visitEventHandler ( generator: DomGenerator...
diff --git a/test/runtime/samples/event-handler-sanitize/_config.js b/test/runtime/samples/event-handler-sanitize/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/event-handler-sanitize/_config.js @@ -0,0 +1,21 @@ +export default { + html: ` + <div>toggle</div> + `, + + test ( assert, component...
Unsafe characters in event names From @stalkerg - [chat](https://gitter.im/sveltejs/svelte?at=592fc1c0631b8e4e6132c526) Handler names are being generated from the event name without sanitizing it first.
null
2017-06-01 11:29: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 shared helpers select-bind-array', 'parse binding', 'parse error-binding-rvalue', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'run...
['runtime inline helpers event-handler-sanitize', 'runtime shared helpers event-handler-sanitize']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Security
false
true
false
false
1
0
1
true
false
["src/generators/dom/visitors/Element/EventHandler.ts->program->function_declaration:visitEventHandler"]
sveltejs/svelte
630
sveltejs__svelte-630
['620']
728594b1c2b24f7b32d0abd10f27ec3cc1773d45
diff --git a/src/generators/dom/visitors/Element/Attribute.ts b/src/generators/dom/visitors/Element/Attribute.ts --- a/src/generators/dom/visitors/Element/Attribute.ts +++ b/src/generators/dom/visitors/Element/Attribute.ts @@ -22,8 +22,7 @@ export default function visitAttribute( const isIndirectlyBoundValue = nam...
diff --git a/test/runtime/samples/attribute-dynamic-type/_config.js b/test/runtime/samples/attribute-dynamic-type/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/attribute-dynamic-type/_config.js @@ -0,0 +1,19 @@ +export default { + 'skip-ssr': true, + + data: { + inputType: 'text', + inputVa...
Can't set type for input tag. I am tring to generate input tag: ```html <input type="{{cond.field_type}}" placeholder="constant" value="{{cond.const}}" on:change="setCondConst(index, this)"> ``` but svelte plugin output: ``` 'svelte' plugin: 'type must be a static attribute ```
`type` needs to be static because in some cases fairly different code is generated depending on the input's type. Allowing `type` to vary would result in all that logic being pushed to the generated code. In addition to making the runtime code more complicated, it would also make the compiler code more complicated. The...
2017-06-11 20:54: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
['validate missing-component', 'validate transition-duplicate-transition-in', 'parse binding', 'parse error-binding-rvalue', 'validate helper-purity-check-no-this', 'validate ondestroy-arrow-no-this', 'validate window-binding-invalid-innerwidth', 'parse yield', 'parse attribute-unquoted', 'validate transition-duplicate...
['validate binding-input-static-type']
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/validate/html/validateElement.ts->program->function_declaration:getType", "src/generators/dom/visitors/Element/Attribute.ts->program->function_declaration:visitAttribute", "src/validate/html/validateElement.ts->program->function_declaration:validateElement", "src/validate/html/validateElement.ts->program->functio...
sveltejs/svelte
676
sveltejs__svelte-676
['608']
b1d1cea3a4e8294a8574f56324c93ca05a07e72a
diff --git a/src/generators/dom/preprocess.ts b/src/generators/dom/preprocess.ts --- a/src/generators/dom/preprocess.ts +++ b/src/generators/dom/preprocess.ts @@ -34,7 +34,8 @@ const preprocessors = { generator: DomGenerator, block: Block, state: State, - node: Node + node: Node, + stripWhitespace: boolean ...
diff --git a/test/js/samples/use-elements-as-anchors/expected-bundle.js b/test/js/samples/use-elements-as-anchors/expected-bundle.js --- a/test/js/samples/use-elements-as-anchors/expected-bundle.js +++ b/test/js/samples/use-elements-as-anchors/expected-bundle.js @@ -136,7 +136,7 @@ var proto = { }; function create_...
Spaces on the edges of elements are not preserved When I render this html in the browser: ```html <h1>Hello <strong>World! </strong><span>How are you?</span></h1> ``` The space at the end of the `strong` element is preserved, and there is a space between the two sentences. However, right now (1.21.0) Svelte ...
This is a bit less straightforward to handle than I was initially thinking. This gets us right into that optimizing/collapsing whitespace stuff that's come up before - when do we want to trim whitespace? when do we want to collapse to a single space? when do we want to leave all whitespace as-is? We can't know this for...
2017-06-25 21:23: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
['validate missing-component', 'validate transition-duplicate-transition-in', 'parse binding', 'parse error-binding-rvalue', 'validate helper-purity-check-no-this', 'validate ondestroy-arrow-no-this', 'validate window-binding-invalid-innerwidth', 'parse yield', 'parse attribute-unquoted', 'validate transition-duplicate...
['parse css', 'parse script-comment-trailing-multiline', 'parse implicitly-closed-li', 'parse script-comment-trailing', 'parse whitespace-leading-trailing', 'parse script', 'parse space-between-mustaches', 'parse script-comment-only', 'parse raw-mustaches', 'parse whitespace-normal']
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
7
0
7
false
false
["src/generators/dom/preprocess.ts->program->function_declaration:preprocess", "src/parse/state/tag.ts->program->function_declaration:tag", "src/generators/server-side-rendering/index.ts->program->function_declaration:ssr", "src/parse/index.ts->program->class_declaration:Parser->method_definition:constructor", "src/gen...
sveltejs/svelte
705
sveltejs__svelte-705
['702']
5eff188b55cf6115938817e513e30386eeff7e0a
diff --git a/mocha.opts b/mocha.opts --- a/mocha.opts +++ b/mocha.opts @@ -1,2 +1 @@ ---bail test/test.js \ No newline at end of file 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 @@ -122,10 +122,9 @@ export default function d...
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 @@ -115,15 +115,11 @@ functio...
intro.start and outro.start events don't fire We do get `intro.end` and `outro.end` events though
null
2017-07-08 18:30: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
[]
['validate missing-component', 'parse script-comment-trailing-multiline', 'validate transition-duplicate-transition-in', 'parse binding', 'parse error-script-unclosed', 'parse error-binding-rvalue', 'parse each-block-keyed', 'validate export-default-duplicated', 'validate helper-purity-check-no-this', 'validate transit...
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/shared/transitions.js->program->function_declaration:wrapTransition", "src/shared/index.js->program->function_declaration:set", "src/generators/dom/visitors/Element/addTransitions.ts->program->function_declaration:addTransitions", "src/shared/index.js->program->function_declaration:callAll", "src/generators/dom/i...
sveltejs/svelte
709
sveltejs__svelte-709
['708']
0a2fed82c948771c90f41b61c0ae698661768739
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 @@ -125,9 +125,6 @@ export default function dom( @dispatchObservers( this, this._observers.pre, newState, oldState ); ${block.hasUpdateMethod && `this._fragment.update( newSta...
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 @@ -115,7 +115,12 @@ function...
Two-way binding observers not initialised in some circumstances Another wild bug courtesy of @TehShrike. Repro [here](https://svelte.technology/repl?version=1.25.0&gist=c48146b14d6a6b28eb8ec38839b933db). Essentially what happens is this: * The `oncreate` function is successfully called for each `<Top>` component,...
null
2017-07-11 02:39: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 each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline hel...
['js if-block-simple', 'js if-block-no-update', 'js onrender-onteardown-rewritten', 'js event-handlers-custom', 'js each-block-changed-check', 'js non-imported-component', 'js use-elements-as-anchors', 'runtime component-binding-blowback-b (shared helpers)', 'js collapses-text-around-comments', 'js computed-collapsed-i...
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/generators/dom/visitors/Element/Binding.ts->program->function_declaration:visitBinding", "src/shared/index.js->program->function_declaration:set", "src/generators/dom/visitors/Element/addTransitions.ts->program->function_declaration:addTransitions", "src/generators/dom/visitors/Component/Binding.ts->program->func...
sveltejs/svelte
718
sveltejs__svelte-718
['713']
0a2fed82c948771c90f41b61c0ae698661768739
diff --git a/src/generators/dom/preprocess.ts b/src/generators/dom/preprocess.ts --- a/src/generators/dom/preprocess.ts +++ b/src/generators/dom/preprocess.ts @@ -92,6 +92,7 @@ const preprocessors = { block: Block, state: State, node: Node, + inEachBlock: boolean, elementStack: Node[], stripWhitespace: ...
diff --git a/test/runtime/samples/whitespace-each-block/_config.js b/test/runtime/samples/whitespace-each-block/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/whitespace-each-block/_config.js @@ -0,0 +1,12 @@ +export default { + data: { + name: 'world' + }, + + test ( assert, component, targe...
Whitespace inside elements is not being preserved inside loops Very related to bug #608. Reproduction: https://svelte.technology/repl?version=1.25.0&gist=10dd087fc24ff3dbf326c06b04e0611a
null
2017-07-24 21:33: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 each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline hel...
['runtime whitespace-normal (inline helpers)', 'runtime whitespace-normal (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/dom/preprocess.ts->program->function_declaration:attachBlocks", "src/generators/dom/preprocess.ts->program->function_declaration:preprocess", "src/generators/dom/preprocess.ts->program->function_declaration:preprocessChildren"]
sveltejs/svelte
720
sveltejs__svelte-720
['711', '711']
0a2fed82c948771c90f41b61c0ae698661768739
diff --git a/src/generators/dom/visitors/Element/Binding.ts b/src/generators/dom/visitors/Element/Binding.ts --- a/src/generators/dom/visitors/Element/Binding.ts +++ b/src/generators/dom/visitors/Element/Binding.ts @@ -7,6 +7,7 @@ import Block from '../../Block'; import { Node } from '../../../../interfaces'; import ...
diff --git a/test/runtime/samples/binding-select-in-yield/Modal.html b/test/runtime/samples/binding-select-in-yield/Modal.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/binding-select-in-yield/Modal.html @@ -0,0 +1,20 @@ +{{#if !hidden}} + {{ yield }} +{{/if}} + +<script> + export default { + data ...
No select example? I have a select box in my component which binds a value using two-way bindings. ```javascript <select bind:value='duration'> {{ #each durations as dur }} <option value="{{ dur }}">{{ dur }} months</option> {{ /each }} </select> ``` The component is nested i...
Yeah, you're right — no example in the REPL, which is ironic since you select examples with a two-way bound select element! Sounds like you've found a bug — are you able to reproduce it in the REPL? Thanks Managed to reproduce the issue: https://svelte.technology/repl?version=1.25.0&gist=d67ed619d2c308b9a20518fa6...
2017-07-25 03:02:40+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-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline hel...
['runtime binding-select-in-yield (inline helpers)', 'runtime binding-select-in-yield (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/visitors/Element/Binding.ts->program->function_declaration:visitBinding"]
sveltejs/svelte
725
sveltejs__svelte-725
['722']
fc7e104e639c53f914e56424370b09a1085ad19f
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 @@ -269,8 +269,9 @@ export default function dom( let result = builder .toString() - .replace(/(\\\\)?@(\w*)/g, (match: string, escaped: string, name: string) => { + .replac...
diff --git a/test/runtime/samples/css/Widget.html b/test/runtime/samples/css/Widget.html --- a/test/runtime/samples/css/Widget.html +++ b/test/runtime/samples/css/Widget.html @@ -2,6 +2,6 @@ <style> p { - color: red; + color: #f00; } </style> diff --git a/test/runtime/samples/css/_config.js b/test/runtime/sam...
Fix for @ disappearing in CSS breaks colours CSS :( It appears that the fix for `@` in CSS stops colours being rendered correctly. I'm seeing: ``` background-color: \#009fdf; border-bottom: 3px solid \#02719e; ``` rendered in my browser, and all my colours have disappeared. Reproduction - inspect t...
oh no! sorry about that — not in a position to fix it right now, but will prioritise it as soon as I am Is the svelte website down for anyone else? repl link brings me to a zeit.co page. Ugh, yeah — just merged a PR on svelte.technology, and that triggered a redeploy (CI). It's supposed to only alias after a successful...
2017-07-27 02:02: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 each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline hel...
['runtime css (inline helpers)', 'runtime css (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/index.ts->program->function_declaration:dom"]
sveltejs/svelte
727
sveltejs__svelte-727
['706', '706']
5c4905a595ece6885dfed8c44b26be544130b6a6
diff --git a/src/generators/dom/visitors/Element/Ref.ts b/src/generators/dom/visitors/Element/Ref.ts --- a/src/generators/dom/visitors/Element/Ref.ts +++ b/src/generators/dom/visitors/Element/Ref.ts @@ -17,7 +17,7 @@ export default function visitRef( `#component.refs.${name} = ${state.parentNode};` ); - block.bu...
diff --git a/test/runtime/samples/ondestroy-before-cleanup/Top.html b/test/runtime/samples/ondestroy-before-cleanup/Top.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/ondestroy-before-cleanup/Top.html @@ -0,0 +1,9 @@ +<div ref:element></div> + +<script> + export default { + ondestroy() { + this.r...
Call ondestroy before cleanup So that `this.refs` is still populated, etc. From [this Gitter convo](https://gitter.im/sveltejs/svelte?at=5963505876a757f808f5cc29) Call ondestroy before cleanup So that `this.refs` is still populated, etc. From [this Gitter convo](https://gitter.im/sveltejs/svelte?at=5963505876a757f808f5...
Huh, seems this already happens in the expected order. @stalkerg can you provide a repro showing the bug you mentioned in Gitter (the Charts.js thing)? A possible reproduction help: when I uncomment this line: https://github.com/TehShrike/svelte-1-25-0-array-binding-repro/blob/17e64d2b7292b824b8805b66443515cd411f11df/s...
2017-07-29 15:51: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-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline hel...
['runtime ondestroy-before-cleanup (inline helpers)', 'runtime ondestroy-before-cleanup (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/visitors/Element/Ref.ts->program->function_declaration:visitRef"]
sveltejs/svelte
728
sveltejs__svelte-728
['721', '721']
5c4905a595ece6885dfed8c44b26be544130b6a6
diff --git a/src/generators/dom/visitors/Component/Component.ts b/src/generators/dom/visitors/Component/Component.ts --- a/src/generators/dom/visitors/Component/Component.ts +++ b/src/generators/dom/visitors/Component/Component.ts @@ -212,7 +212,7 @@ export default function visitComponent( ${updates.join('\n')} ...
diff --git a/test/runtime/samples/component-binding-blowback-c/Nested.html b/test/runtime/samples/component-binding-blowback-c/Nested.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-binding-blowback-c/Nested.html @@ -0,0 +1,18 @@ +<li> + {{yield}} +</li> + +<script> + const initialValues = ...
Some combination of keyed blocks and binding breaks array looping Reproduction: https://svelte.technology/repl?version=1.26.0&gist=59c36b2a892a2e3be0d6b1441f5971f5 When the number is increased, on every other change, only the first two (after the reverse) elements are displayed. Like the note in the repl says, if...
Beyond that, here's the case I was actually trying to work towards, where the index/position in the array is passed in to the child component: https://svelte.technology/repl?version=1.26.0&gist=8e6a7f22a5813d146e2fa04d21285fd6 With the added `this.observe('position')` in the child, It produces actual console errors ...
2017-07-29 16:22: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 each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline hel...
['runtime component-binding-blowback-c (shared helpers)', 'runtime component-binding-blowback-c (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/dom/visitors/Component/Component.ts->program->function_declaration:visitComponent"]
sveltejs/svelte
729
sveltejs__svelte-729
['697']
71047c2961d037cfcabb5c7382fb4b75ea2625f9
diff --git a/src/css/Selector.ts b/src/css/Selector.ts --- a/src/css/Selector.ts +++ b/src/css/Selector.ts @@ -2,12 +2,6 @@ import MagicString from 'magic-string'; import { Validator } from '../validate/index'; import { Node } from '../interfaces'; -interface Block { - global: boolean; - combinator: Node; - selecto...
diff --git a/test/css/index.js b/test/css/index.js --- a/test/css/index.js +++ b/test/css/index.js @@ -69,7 +69,7 @@ describe("css", () => { css: read(`test/css/samples/${dir}/expected.css`) }; - assert.equal(dom.css.replace(/svelte-\d+/g, 'svelte-xyz').trim(), expected.css.trim()); + assert.equal(dom.cs...
Minify CSS, and remove unused rules We're already detecting unused rules — we may as well remove them. While we're at it, we could easily remove whitespace to pack things down a little bit.
null
2017-07-29 19:56: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 each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline hel...
['css cascade-false', 'css omit-scoping-attribute-attribute-selector-equals-case-insensitive', 'ssr styles-nested', 'css cascade-false-universal-selector', 'css omit-scoping-attribute-descendant-global-inner-class', 'css omit-scoping-attribute-whitespace', 'js css-media-query', 'css omit-scoping-attribute-attribute-sel...
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
16
5
21
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/css/Stylesheet.ts->program->class_declaration:Rule->method_definition:minify", "src/css/Stylesheet.ts->program->class_declaration:Stylesheet->me...
sveltejs/svelte
733
sveltejs__svelte-733
['375', '375']
71047c2961d037cfcabb5c7382fb4b75ea2625f9
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 @@ -25,6 +25,8 @@ export class DomGenerator extends Generator { hasOutroTransitions: boolean; hasComplexBindings: boolean; + needsEncapsulateHelper: boolean; + constructor( ...
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 @@ -143,6 +143,10 @@ var temp...
Store CSS hashed attribute in a variable A nice easy win — currently if you have a component with CSS, top-level elements get this treatment: ```js setAttribute( div, 'svelte-3599223440', '' ); ``` If there's more than one top-level element, it would make more sense to do this instead: ```js var cssAttr = '...
2017-07-29 23:10: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 each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline hel...
['js collapses-text-around-comments', 'js css-media-query']
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
false
false
true
3
1
4
false
false
["src/generators/dom/visitors/Element/Element.ts->program->function_declaration:visitElement", "src/generators/dom/index.ts->program->class_declaration:DomGenerator", "src/generators/dom/index.ts->program->class_declaration:DomGenerator->method_definition:constructor", "src/generators/dom/index.ts->program->function_de...
sveltejs/svelte
735
sveltejs__svelte-735
['643']
130701af2c6cdbfdec20dc7418380005ebc52fd1
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 @@ -211,7 +211,7 @@ export default function dom( this._root = options._root || this; this._yield = options._yield; - this._torndown = false; + this._destroyed = false;...
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 @@ -201,7 +201,7 @@ function ...
Runtime error with nested components, {{#if}}s, and {{yield}} Very similar to https://github.com/sveltejs/svelte/issues/625 - observed in Svelte 1.22.3. I got a reproduction in the REPL [here](https://svelte.technology/repl?version=1.22.3&gist=6c615c874cab9369d44a7dafdeb08ebc) but then downloaded it locally to fiddl...
Hitting the same error in one of my projects using Svelte when I upgraded from a 5 month old version. Only difference is that while it's the same error (calling unmount on null fragment) my project doesn't use loops. Your example is much smaller than mine, so I'll try to debug it and figure out what's going on. yeah, i...
2017-07-30 00:34: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-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline hel...
['runtime destroy-twice (shared helpers)', 'js css-media-query', 'js if-block-simple', 'runtime dev-warning-destroy-twice (inline helpers)', 'js if-block-no-update', 'js onrender-onteardown-rewritten', 'js event-handlers-custom', 'js each-block-changed-check', 'js non-imported-component', 'runtime destroy-twice (inline...
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/index.ts->program->function_declaration:dom"]
sveltejs/svelte
738
sveltejs__svelte-738
['693']
ae060cfa3b228ff2d1646e60700e77aace1e4780
diff --git a/src/css/Selector.ts b/src/css/Selector.ts --- a/src/css/Selector.ts +++ b/src/css/Selector.ts @@ -51,7 +51,7 @@ export default class Selector { }); } - transform(code: MagicString, attr: string) { + transform(code: MagicString, attr: string, id: string) { function encapsulateBlock(block: Block) {...
diff --git a/test/css/index.js b/test/css/index.js --- a/test/css/index.js +++ b/test/css/index.js @@ -81,19 +81,19 @@ describe("css", () => { new Component({ target, data: config.data }); const html = target.innerHTML; - fs.writeFileSync(`test/css/samples/${dir}/_actual.html`, html); + // dom + ...
using refs in css When I use a ref, I most often also want to get a handle to it with css, which leads to slightly annoying, duplicative markup. ```html <style> .container { color: red } </style> <div class="container" ref:container></div> ``` The only solutions I can think of to mitigate this are...
What about this? ```html <style> ref:container { color: red } </style> <div ref:container></div> ``` It's valid CSS so shouldn't present any problems with parsing/syntax highlighting etc (csstree [thinks](http://astexplorer.net/#/gist/0199b0325c803086699502567d8070ce/7d27503f0bd8d4020718b86c9a1e255...
2017-07-30 18:33:28+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-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline hel...
['css refs', 'parse css-ref-selector', 'css refs-qualified']
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
7
0
7
false
false
["src/css/Selector.ts->program->class_declaration:Selector->method_definition:transform->function_declaration:encapsulateBlock", "src/css/Selector.ts->program->function_declaration:selectorAppliesTo", "src/parse/read/style.ts->program->function_declaration:readStyle", "src/css/Selector.ts->program->class_declaration:Se...
sveltejs/svelte
747
sveltejs__svelte-747
['741', '741']
4daef9ab5e2a78b3e644c117f89cf7007ee2b374
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 @@ -4,7 +4,7 @@ import annotateWithScopes from '../../utils/annotateWithScopes'; import isReference from '../../utils/isReference'; import { walk } from 'estree-walker'; import d...
diff --git a/test/runtime/samples/attribute-static-at-symbol/_config.js b/test/runtime/samples/attribute-static-at-symbol/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/attribute-static-at-symbol/_config.js @@ -0,0 +1,3 @@ +export default { + html: `<a href='mailto:hello@example.com'>email</a>...
`@` stripped from attribute values in SSR mode ```html <a href='mailto:hello@example.com'>email</a> ``` when run through the compiler in SSR mode produces ```javascript ... return `<a href="mailto:helloexample.com">email</a>`.trim(); ... ``` `@` stripped from attribute values in SSR mode ```html <a href='m...
Looking at the code for this, I noticed something else: double quotes in attribute values in SSR are also not handled well - ```html <span title='"foo"'>foo</span> ``` produces ```javascript ... return `<span title=""foo"">foo</span>`.trim(); ... ``` Looking at the code for this, I noticed something else...
2017-08-04 02:38: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 each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline hel...
['ssr attribute-static-at-symbol', 'ssr attribute-static-quotemarks']
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/server-side-rendering/visitors/Text.ts->program->function_declaration:visitText", "src/utils/stringify.ts->program->function_declaration:escape", "src/generators/server-side-rendering/visitors/Element.ts->program->function_declaration:stringifyAttributeValue", "src/generators/server-side-rendering/inde...
sveltejs/svelte
755
sveltejs__svelte-755
['744']
8dd23b81df5bbbb5b549ea9cfe9e2a4818a21740
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 @@ -174,8 +174,8 @@ export default function dom( ? `@proto ` : deindent` { - ${['get', 'fire', 'observe', 'on', 'set'] - .map(n => `${n}: @${n}`) + ${['destroy', 'ge...
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 @@ -37,6 +37,17 @@ function s...
"Uncaught TypeError: Cannot read property 'update' of null" when calling set in an event after destroy This manifests when using an evented object that has a listener that destroys the Component & a subsequent listener that sets a value on the Component. https://svelte.technology/repl?version=1.27.0&gist=16c53dce350...
@btakita what should the intended behaviour be? And what's up man lol. Would a dev mode error like this solve the problem? > You cannot call `.set(...)` on a component that has been destroyed I'd rather it not throw an error. Right now, I shimmed a method that checks to see if the component is "active" before...
2017-08-06 02:20: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 each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline hel...
['js setup-method', 'js css-media-query', 'js if-block-simple', 'js if-block-no-update', 'js onrender-onteardown-rewritten', 'js event-handlers-custom', 'js each-block-changed-check', 'js non-imported-component', 'runtime set-after-destroy (inline helpers)', 'js use-elements-as-anchors', 'js collapses-text-around-comme...
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/index.js->program->function_declaration:destroy", "src/shared/index.js->program->function_declaration:destroyDev", "src/generators/dom/index.ts->program->function_declaration:dom"]
sveltejs/svelte
764
sveltejs__svelte-764
['762']
dff1cb5fe33acddd37e72769414b89e0e65c77c6
diff --git a/src/generators/dom/visitors/EachBlock.ts b/src/generators/dom/visitors/EachBlock.ts --- a/src/generators/dom/visitors/EachBlock.ts +++ b/src/generators/dom/visitors/EachBlock.ts @@ -439,6 +439,7 @@ function unkeyed( ` : deindent` ${iterations}[#i] = ${create_each_block}( ${params}, ${each_blo...
diff --git a/test/runtime/samples/each-block-static/_config.js b/test/runtime/samples/each-block-static/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/each-block-static/_config.js @@ -0,0 +1,12 @@ +export default { + data: { + items: [] + }, + + html: ``, + + test (assert, component, target) ...
Uncaught Error: NotFoundError: DOM Exception 8 in {{#each}} <!-- 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...
This is a guess, but maybe `target` isn't a DOM node? This can happen if you do ```js import App from './App.html'; new App({ target: document.querySelector('.does-not-exist') }); ``` Can happen if the selector contains a typo. Compiling with `dev: true` should catch this error, if that's what's happenin...
2017-08-13 17:58:27+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-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline hel...
['runtime each-block-static (shared helpers)', 'runtime each-block-static (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/dom/visitors/EachBlock.ts->program->function_declaration:unkeyed"]
sveltejs/svelte
765
sveltejs__svelte-765
['759']
dff1cb5fe33acddd37e72769414b89e0e65c77c6
diff --git a/src/css/Stylesheet.ts b/src/css/Stylesheet.ts --- a/src/css/Stylesheet.ts +++ b/src/css/Stylesheet.ts @@ -144,7 +144,8 @@ class Atrule { minify(code: MagicString, cascade: boolean) { if (this.node.name === 'media') { - let c = this.node.start + 6; + const expressionChar = code.original[this.node...
diff --git a/test/css/samples/media-query-word/expected.css b/test/css/samples/media-query-word/expected.css new file mode 100644 --- /dev/null +++ b/test/css/samples/media-query-word/expected.css @@ -0,0 +1 @@ +@media only screen and (min-width: 400px){div[svelte-xyz],[svelte-xyz] div{color:red}} \ No newline at end o...
CSS @media tags compiled incorrectly <!-- 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://svelte.technology/re...
Current workaround: Avoid using words; use only the parenthesized condition. Browsers will treat the parentheses as a word boundary. For example: ``` @media (min-width: 42em) {} ```
2017-08-13 18:07:28+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-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline hel...
['css media-query-word']
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/Stylesheet.ts->program->class_declaration:Atrule->method_definition:minify"]
sveltejs/svelte
766
sveltejs__svelte-766
['740']
dff1cb5fe33acddd37e72769414b89e0e65c77c6
diff --git a/src/generators/dom/visitors/Element/Binding.ts b/src/generators/dom/visitors/Element/Binding.ts --- a/src/generators/dom/visitors/Element/Binding.ts +++ b/src/generators/dom/visitors/Element/Binding.ts @@ -156,9 +156,26 @@ export default function visitBinding( } `); - block.builders.hydrate.addBlock...
diff --git a/test/runtime/samples/binding-input-range-change/_config.js b/test/runtime/samples/binding-input-range-change/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/binding-input-range-change/_config.js @@ -0,0 +1,33 @@ +export default { + data: { + count: 42 + }, + + html: ` + <input ty...
input[type=range] + bind + ie11 It appears that bind applied to range inputs does not work on ie11. `on:change` does work though. https://svelte.technology/repl?version=1.27.0&gist=6f651445c5cb4c374b986be8cf5dcc29
Dammit IE! Since I can't easily test it, does the `change` event fire while you're still dragging in IE, or only after you've finished? On IE11, the `change` event fires throughout the drag. BTW, I did my testing on Browserstack. To fix, I used both `on:change` & `bind`. Hmm, to test the link above on IE11, it lo...
2017-08-13 18:18: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 each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline hel...
['runtime binding-input-range-change (inline helpers)', 'runtime binding-input-range-change (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/visitors/Element/Binding.ts->program->function_declaration:visitBinding"]
sveltejs/svelte
770
sveltejs__svelte-770
['767']
276b7998f93a1079ebcfb968ecbba9911c3db742
diff --git a/src/css/Selector.ts b/src/css/Selector.ts --- a/src/css/Selector.ts +++ b/src/css/Selector.ts @@ -26,15 +26,16 @@ export default class Selector { } apply(node: Node, stack: Node[]) { - const applies = selectorAppliesTo(this.localBlocks.slice(), node, stack.slice()); + const toEncapsulate: Node[] = ...
diff --git a/test/css/index.js b/test/css/index.js --- a/test/css/index.js +++ b/test/css/index.js @@ -1,66 +1,78 @@ -import assert from "assert"; -import * as fs from "fs"; -import { env, normalizeHtml, svelte } from "../helpers.js"; +import assert from 'assert'; +import * as fs from 'fs'; +import { env, normalizeHtml...
Descendant selector fails if outer element is not top-level [REPL](https://svelte.technology/repl?version=1.29.2&gist=08f4e2525f02a822e9433c0bd288e1c5): ```html <div> <p> <span>styled</span> </p> </div> <style> p span { color: red; } </style> ``` The `<p>` element is not given the `sv...
null
2017-08-14 18:35: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-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime ignore-unchanged-attribute-compound (shared helpers)', 'form...
['css descendant-selector-non-top-level-outer']
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/css/Selector.ts->program->class_declaration:Block->method_definition:constructor", "src/css/Selector.ts->program->class_declaration:Selector->method_definition:transform", "src/css/Selector.ts->program->function_declaration:selectorAppliesTo", "src/css/Selector.ts->program->class_declaration:Block", "src/css/Sele...
sveltejs/svelte
775
sveltejs__svelte-775
['774']
9b950f9ac0f9860ca0fb5e2387320d6798f3cda2
diff --git a/src/css/Selector.ts b/src/css/Selector.ts --- a/src/css/Selector.ts +++ b/src/css/Selector.ts @@ -52,7 +52,7 @@ export default class Selector { }); } - transform(code: MagicString, attr: string, id: string) { + transform(code: MagicString, attr: string) { function encapsulateBlock(block: Block) {...
diff --git a/test/css/samples/cascade-false-keyframes-from-to/_config.js b/test/css/samples/cascade-false-keyframes-from-to/_config.js new file mode 100644 --- /dev/null +++ b/test/css/samples/cascade-false-keyframes-from-to/_config.js @@ -0,0 +1,3 @@ +export default { + cascade: false +}; \ No newline at end of file d...
Keyframe 'from' and 'to' selectors erroneously removed [REPL](https://svelte.technology/repl?version=1.29.3&gist=b75f144f9935068802c145e38fa9a122). Svelte is under the impression that these are unused element selectors: ```css @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } } ```
null
2017-08-16 02:10: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-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime ignore-unchanged-attribute-compound (shared helpers)', 'form...
['css cascade-false-keyframes-from-to']
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
3
18
false
false
["src/css/Stylesheet.ts->program->class_declaration:Atrule->method_definition:minify", "src/css/Stylesheet.ts->program->class_declaration:Atrule->method_definition:apply", "src/css/Stylesheet.ts->program->class_declaration:Atrule", "src/css/Stylesheet.ts->program->class_declaration:Rule->method_definition:validate", "s...
sveltejs/svelte
778
sveltejs__svelte-778
['773']
cd1e8c12c1cac219b4f5659d3c0e494654bb431e
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 @@ -20,6 +20,7 @@ export class DomGenerator extends Generator { metaBindings: string[]; hydratable: boolean; + legacy: boolean; hasIntroTransitions: boolean; hasOutroTra...
diff --git a/test/js/index.js b/test/js/index.js --- a/test/js/index.js +++ b/test/js/index.js @@ -2,7 +2,7 @@ import assert from "assert"; import * as fs from "fs"; import * as path from "path"; import { rollup } from "rollup"; -import { svelte } from "../helpers.js"; +import { loadConfig, svelte } from "../helpers...
Potentially catch input type assignment for older browsers? The new input types are great for progressive enhancement in HTML because if an old browser doesn't support them it just renders a `type="text"` input, which is perfect. Unfortunately, doing this doesn't work in svelte because (at least in IE9) the `input.type...
Gah, didn't realise that caused an error! I wonder if the best solution would be to have a `legacy` compile option that changed that code to this: ```js try { input.type = 'search'; } catch (e) {} // or setInputType(input, 'search'); // where setInputType does the above ``` That would be perfect! +1 for moving...
2017-08-17 23: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 each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime ignore-unchanged-attribute-compound (shared helpers)', 'form...
['js legacy-input-type']
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/generators/dom/visitors/Element/Attribute.ts->program->function_declaration:visitAttribute", "src/generators/dom/index.ts->program->class_declaration:DomGenerator->method_definition:constructor", "src/generators/dom/index.ts->program->class_declaration:DomGenerator", "src/shared/dom.js->program->function_declarat...
sveltejs/svelte
785
sveltejs__svelte-785
['784']
c7dda9ff79f5588cce6e77edbb9ff243f2db43f5
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 @@ -213,7 +213,7 @@ export default function dom( ${options.dev && `if ( options.hydrate ) throw new Error( 'options.hydrate only works if the component was compiled with the ...
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 @@ -237,7 +237,7 @@ function ...
Allow `anchor` to be passed in initial component instantiation Hi, just started using svelte and I'm really liking it so far! What do you think about allowing the initial config object to contain an `anchor` attribute so the component could be bootstrapped at a particular place in the dom? In practice it would lo...
null
2017-08-25 17:35: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 each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime ignore-unchanged-attribute-compound (shared helpers)', 'form...
['js setup-method', 'js legacy-input-type', 'js css-media-query', 'js if-block-simple', 'js if-block-no-update', 'js onrender-onteardown-rewritten', 'js event-handlers-custom', 'js each-block-changed-check', 'js non-imported-component', 'js use-elements-as-anchors', 'js collapses-text-around-comments', 'js computed-col...
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
1
0
1
true
false
["src/generators/dom/index.ts->program->function_declaration:dom"]
sveltejs/svelte
786
sveltejs__svelte-786
['783']
d6f186ddec600cf4c1a3d6a296692ba7e6339ffe
diff --git a/src/css/Stylesheet.ts b/src/css/Stylesheet.ts --- a/src/css/Stylesheet.ts +++ b/src/css/Stylesheet.ts @@ -30,15 +30,19 @@ class Rule { minify(code: MagicString, cascade: boolean) { let c = this.node.start; + let started = false; + this.selectors.forEach((selector, i) => { if (cascade || sele...
diff --git a/test/css/samples/unused-selector-leading/_config.js b/test/css/samples/unused-selector-leading/_config.js new file mode 100644 --- /dev/null +++ b/test/css/samples/unused-selector-leading/_config.js @@ -0,0 +1,39 @@ +export default { + cascade: false, + + warnings: [ + { + filename: "SvelteComponent.htm...
CSS selector removal causing style errors [REPL](https://svelte.technology/repl?version=1.31.0&gist=ad2b365b960c0273a8565114faebcf28): ```html <!--<p class='foo'>foo</p>--> <p class='bar'>bar</p> <p class='baz'>baz</p> <style> .foo, .bar, .baz { color: red; } </style> ``` The `.foo` gets removed, b...
null
2017-08-25 21:41:28+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-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime ignore-unchanged-attribute-compound (shared helpers)', 'form...
['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
1
0
1
true
false
["src/css/Stylesheet.ts->program->class_declaration:Rule->method_definition:minify"]
sveltejs/svelte
792
sveltejs__svelte-792
['790']
87ef5ffefd6cd993acaf2dc8d9c4911112cd0c36
diff --git a/src/generators/server-side-rendering/visitors/Slot.ts b/src/generators/server-side-rendering/visitors/Slot.ts --- a/src/generators/server-side-rendering/visitors/Slot.ts +++ b/src/generators/server-side-rendering/visitors/Slot.ts @@ -12,7 +12,7 @@ export default function visitSlot( const name = node.attr...
diff --git a/test/runtime/samples/component-slot-nested/Nested.html b/test/runtime/samples/component-slot-nested/Nested.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-nested/Nested.html @@ -0,0 +1,5 @@ +<div> + <slot name='foo'> + <slot name='bar'></slot> + </slot> +</div> \ No newli...
<slot> can be nested I misread this — it turns out [you can nest](https://webkit.org/blog/4096/introducing-shadow-dom-api/) `<slot>` elements in web components, so we should too: ```html <b>Name</b>: <slot name="fullName"> <slot name="firstName"></slot> <slot name="lastName"></slot> </slot><br> <b>Emai...
null
2017-08-29 12:03: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime ignore-unchanged-attribute-com...
['ssr component-slot-nested', 'runtime component-slot-nested (shared helpers)', 'runtime component-slot-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
Feature
false
true
false
false
2
0
2
false
false
["src/generators/server-side-rendering/visitors/Slot.ts->program->function_declaration:visitSlot", "src/parse/state/tag.ts->program->function_declaration:tag"]
sveltejs/svelte
793
sveltejs__svelte-793
['791']
87ef5ffefd6cd993acaf2dc8d9c4911112cd0c36
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 @@ -116,6 +116,10 @@ export default function validateElement(validator: Validator, node: Node, refs: } else if (attribute.type === 'EventHandl...
diff --git a/test/validator/samples/transition-on-component/errors.json b/test/validator/samples/transition-on-component/errors.json new file mode 100644 --- /dev/null +++ b/test/validator/samples/transition-on-component/errors.json @@ -0,0 +1,8 @@ +[{ + "message": "Transitions can only be applied to DOM elements, not ...
Warn/error if transition directives are applied to component Via https://github.com/sveltejs/svelte-transitions/issues/4
null
2017-08-29 12:16:55+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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime ignore-unchanged-attribute-com...
['validate transition-on-component']
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
794
sveltejs__svelte-794
['550', '777']
87ef5ffefd6cd993acaf2dc8d9c4911112cd0c36
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 @@ -151,9 +151,9 @@ export default function dom( // TODO deprecate component.teardown() builder.addBlock(deindent` function ${name} ( options ) { - options = options || {};...
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 @@ -217,7 +217,7 @@ function ...
Pass options through to `oncreate` This has come up ([most recently](http://stackoverflow.com/questions/43740119/access-target-from-a-instantiated-component)) once or twice in discussion — there are some situations where it would be helpful to be able to access the instantiation options in `oncreate` (though I don't th...
I admire the simplicity and power of svelte but did wonder about the lack of lifecycle events. Unless I'm misunderstanding this wouldn't a beforeCreate event to go with onCreate/afterCreate event be simpler? (likewise for destroy). Am assuming target node would be accessible in the updated onCreate/afterCreate. What wo...
2017-08-29 12:39:42+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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime ignore-unchanged-attribute-com...
['js setup-method', 'js legacy-input-type', 'js css-media-query', 'js if-block-simple', 'js if-block-no-update', 'js onrender-onteardown-rewritten', 'runtime options (shared helpers)', 'js event-handlers-custom', 'js each-block-changed-check', 'js non-imported-component', 'js use-elements-as-anchors', 'js collapses-tex...
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
1
0
1
true
false
["src/generators/dom/index.ts->program->function_declaration:dom"]
sveltejs/svelte
796
sveltejs__svelte-796
['757']
87ef5ffefd6cd993acaf2dc8d9c4911112cd0c36
diff --git a/src/css/Stylesheet.ts b/src/css/Stylesheet.ts --- a/src/css/Stylesheet.ts +++ b/src/css/Stylesheet.ts @@ -135,10 +135,15 @@ class Declaration { minify(code: MagicString) { const c = this.node.start + this.node.property.length; - const first = this.node.value.children[0]; + const first = this.node....
diff --git a/test/css/samples/css-vars/expected.css b/test/css/samples/css-vars/expected.css new file mode 100644 --- /dev/null +++ b/test/css/samples/css-vars/expected.css @@ -0,0 +1 @@ +div[svelte-xyz],[svelte-xyz] div{--test:10} \ No newline at end of file diff --git a/test/css/samples/css-vars/input.html b/test/css...
CSS variables cause build failure Setting a CSS variable in a `<style>` section of a svelte template triggers a build error: ```html <style> .foo { --test: 10; } </style> ``` ``` Module build failed: Error: TypeError: Cannot read property '0' of undefined ``` - [**repl link**](https://svelte.technology/re...
[Here's how css-tree parses that.](https://astexplorer.net/#/gist/244e2fb4da940df52bf0f4b94277db44/cec0e01c3dd7b6102fa42c4919e413c26c785180) The value of the custom property declaration has `type: 'Raw'`, and has no `children` array, and so an error is thrown [here](https://github.com/sveltejs/svelte/blob/8dd23b81df5bb...
2017-08-29 13:21: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime ignore-unchanged-attribute-com...
['css css-vars']
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/Stylesheet.ts->program->class_declaration:Declaration->method_definition:minify"]
sveltejs/svelte
800
sveltejs__svelte-800
['798']
835a48bec5cb49cf2bba50c512076bb0fbf15d65
diff --git a/src/css/Selector.ts b/src/css/Selector.ts --- a/src/css/Selector.ts +++ b/src/css/Selector.ts @@ -160,7 +160,7 @@ function applySelector(blocks: Block[], node: Node, stack: Node[], toEncapsulate } else if (selector.type === 'AttributeSelector') { - if (!attributeMatches(node, selector.name.name, ...
diff --git a/test/css/samples/attribute-selector-unquoted/_config.js b/test/css/samples/attribute-selector-unquoted/_config.js new file mode 100644 --- /dev/null +++ b/test/css/samples/attribute-selector-unquoted/_config.js @@ -0,0 +1,3 @@ +export default { + cascade: false +}; \ No newline at end of file diff --git a/...
[foo=bar] crashes [REPL](https://svelte.technology/repl?version=1.34.0&gist=27d1a1b7aeb1d0fe4c5240cda1c08dad). `[foo='bar']` is fine, but `[foo=bar]` is not.
null
2017-08-30 00:25: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime ignore-unchanged-attribute-com...
['css attribute-selector-unquoted']
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/css/Selector.ts->program->function_declaration:applySelector", "src/css/Selector.ts->program->function_declaration:unquote"]
sveltejs/svelte
806
sveltejs__svelte-806
['801']
223dbee98c9b8faca6ad17032c3a083e65eda06a
diff --git a/src/generators/server-side-rendering/index.ts b/src/generators/server-side-rendering/index.ts --- a/src/generators/server-side-rendering/index.ts +++ b/src/generators/server-side-rendering/index.ts @@ -6,13 +6,13 @@ import preprocess from './preprocess'; import visit from './visit'; import { removeNode, ...
diff --git a/test/runtime/samples/component-slot-nested-component/Inner.html b/test/runtime/samples/component-slot-nested-component/Inner.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-nested-component/Inner.html @@ -0,0 +1,3 @@ +<div class='inner'> + <slot></slot> +</div> \ No newlin...
SSR bug with nested components Looks like this arose with the `<slot>` changes. Compiling ```html <Outer> <Inner>Foo</Inner> </Outer> <script> export default { components: { Outer, Inner } } </script> ``` in SSR mode produces <details> <summary>click to expand</summary> ```javascript 'use strict'...
null
2017-08-31 15:11: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (s...
['ssr component-slot-nested-component']
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
6
1
7
false
false
["src/generators/server-side-rendering/visitors/Component.ts->program->function_declaration:visitComponent", "src/generators/server-side-rendering/index.ts->program->class_declaration:SsrGenerator->method_definition:constructor", "src/generators/server-side-rendering/index.ts->program->class_declaration:SsrGenerator->m...
sveltejs/svelte
807
sveltejs__svelte-807
['788']
865e84b85608b6e4fd900ab791ca873d3ce04ee2
diff --git a/src/shared/index.js b/src/shared/index.js --- a/src/shared/index.js +++ b/src/shared/index.js @@ -5,8 +5,9 @@ export * from './transitions.js'; export * from './utils.js'; export function destroy(detach) { - this.destroy = this.set = this.get = noop; + this.destroy = noop; this.fire('destroy'); + 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 @@ -38,8 +38,9 @@ function se...
Recent change: `set`, `get` no longer functional in `ondestroy` Somewhere between `1.29` and `1.32` (I think mostly in #755), `set` and `get` turned into `noop` by the time `ondestroy` is called. I have some use cases for calling both those methods (especially `get`) in `ondestroy`, so it would be nice to leave them...
From what I gathered in gitter, your use case was mainly storing listener deregisterers on the component and then calling them in `ondestroy`. I recently had to deal with something like that, and how I handled it was ``` oncreate() { this.on('destroy', registerListenerAndReturnDeregisterer()) } ``` i.e., I ...
2017-08-31 17:26: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (s...
['js setup-method', 'js legacy-input-type', 'js css-media-query', 'runtime set-in-ondestroy (inline helpers)', 'js if-block-simple', 'js if-block-no-update', 'js onrender-onteardown-rewritten', 'js event-handlers-custom', 'runtime set-in-ondestroy (shared helpers)', 'js each-block-changed-check', 'js non-imported-compo...
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
809
sveltejs__svelte-809
['804']
e30ff542da4d0ffb48f1e23d995a146730a0e2ac
diff --git a/src/generators/dom/visitors/Component.ts b/src/generators/dom/visitors/Component.ts --- a/src/generators/dom/visitors/Component.ts +++ b/src/generators/dom/visitors/Component.ts @@ -185,7 +185,7 @@ export default function visitComponent( _bind: function(changed, childState) { var state = #compon...
diff --git a/test/runtime/samples/observe-binding-ignores-unchanged/Nested.html b/test/runtime/samples/observe-binding-ignores-unchanged/Nested.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/observe-binding-ignores-unchanged/Nested.html @@ -0,0 +1 @@ +<input type="number" bind:value="field1"> \ No n...
Observe work incorrect if component has bindings from parent Subj. REPL example: https://svelte.technology/repl?version=1.34.0&gist=f9ea84a2f4f0c6c1a2745244023e8ae8 just try change field. Example with directly observed from parent: https://svelte.technology/repl?version=1.34.0&gist=43722dc52a63412f3f89726b5aecc1...
null
2017-09-01 16:09:28+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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (s...
['runtime observe-binding-ignores-unchanged (inline helpers)', 'runtime observe-binding-ignores-unchanged (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/visitors/Component.ts->program->function_declaration:visitComponent"]
sveltejs/svelte
812
sveltejs__svelte-812
['781']
dc48ae63586852fc0acff015a165bb7644195e52
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 @@ -147,7 +147,10 @@ export default function dom( .join(',\n')} }`; + const debugName = `<${generator.customElement ? generator.tag : name}>`; + const constructorBody = ...
diff --git a/test/runtime/samples/dev-warning-missing-data-binding/_config.js b/test/runtime/samples/dev-warning-missing-data-binding/_config.js --- a/test/runtime/samples/dev-warning-missing-data-binding/_config.js +++ b/test/runtime/samples/dev-warning-missing-data-binding/_config.js @@ -2,6 +2,6 @@ export default { ...
Runtime dev warnings should indicate the component in question Via [Gitter](https://gitter.im/sveltejs/svelte?at=599adcfcee5c9a4c5fe3be0c). Bit confusing if you see this without a component name... > Component was created without expected data property 'event'
null
2017-09-03 14:25:21+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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (s...
['runtime dev-warning-missing-data-binding (inline helpers)', 'runtime dev-warning-missing-data (inline helpers)', 'runtime dev-warning-missing-data (shared helpers)', 'runtime dev-warning-missing-data-binding (shared helpers)', 'runtime dev-warning-readonly-window-binding (inline helpers)', 'runtime dev-warning-readon...
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:_setDev", "src/generators/dom/index.ts->program->function_declaration:dom"]
sveltejs/svelte
814
sveltejs__svelte-814
['645']
2c8268bf1cb6e48d095c0475356612ed6561169b
diff --git a/src/generators/dom/visitors/Element/Binding.ts b/src/generators/dom/visitors/Element/Binding.ts --- a/src/generators/dom/visitors/Element/Binding.ts +++ b/src/generators/dom/visitors/Element/Binding.ts @@ -51,10 +51,13 @@ export default function visitBinding( let setter = getSetter(block, name, snippet...
diff --git a/test/js/samples/input-without-blowback-guard/expected-bundle.js b/test/js/samples/input-without-blowback-guard/expected-bundle.js new file mode 100644 --- /dev/null +++ b/test/js/samples/input-without-blowback-guard/expected-bundle.js @@ -0,0 +1,237 @@ +function noop() {} + +function assign(target) { + var...
Redundant input blowback guard? First of a couple of random thoughts I just had: If you have a template like [this](https://svelte.technology/repl?version=1.22.4&gist=814af8163ea6d4d7be709b7e55040d84)... ```html <input bind:value> ``` ...Svelte generates code like this: ```js function input_input_handler...
null
2017-09-03 16:46: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (s...
['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
Refactoring
false
true
false
false
1
0
1
true
false
["src/generators/dom/visitors/Element/Binding.ts->program->function_declaration:visitBinding"]
sveltejs/svelte
835
sveltejs__svelte-835
['822']
52559576925996b73a0b15ddcf3020e15a8841b7
diff --git a/src/generators/dom/preprocess.ts b/src/generators/dom/preprocess.ts --- a/src/generators/dom/preprocess.ts +++ b/src/generators/dom/preprocess.ts @@ -412,6 +412,8 @@ function preprocessChildren( lastChild = null; cleaned.forEach((child: Node, i: number) => { + child.parent = node; + const preproc...
diff --git a/test/runtime/samples/component-slot-if-block/Nested.html b/test/runtime/samples/component-slot-if-block/Nested.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-if-block/Nested.html @@ -0,0 +1,3 @@ +<div> + <slot/> +</div> \ No newline at end of file diff --git a/test/runtim...
If condition in default slot or try mount to empty fragment First - example: https://svelte.technology/repl?version=1.37.0&gist=77279f780755dcecd28eb8899a08e22d and working one: https://svelte.technology/repl?version=1.31.0&gist=77279f780755dcecd28eb8899a08e22d it's happening because Svelte generates next code: ...
Wraparound - add root div element around all "slot" content. It will be like: ```js if_block.mount( div, null ); ```
2017-09-10 17:13:11+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm install electron@1.8.8 && 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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['runtime component-slot-if-block (inline helpers)', 'runtime component-slot-if-block (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
7
0
7
false
false
["src/generators/dom/visitors/EachBlock.ts->program->function_declaration:visitEachBlock", "src/generators/dom/visitors/IfBlock.ts->program->function_declaration:compound", "src/generators/dom/visitors/IfBlock.ts->program->function_declaration:visitIfBlock", "src/generators/dom/visitors/shared/isDomNode.ts->program->fu...
sveltejs/svelte
844
sveltejs__svelte-844
['843']
b64d95021a2b0d024520a8fdfe12f1cf8817f9b3
diff --git a/src/generators/dom/preprocess.ts b/src/generators/dom/preprocess.ts --- a/src/generators/dom/preprocess.ts +++ b/src/generators/dom/preprocess.ts @@ -417,6 +417,8 @@ function preprocessChildren( const preprocessor = preprocessors[child.type]; if (preprocessor) preprocessor(generator, block, state, ch...
diff --git a/test/runtime/samples/svg-each-block-anchor/_config.js b/test/runtime/samples/svg-each-block-anchor/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/svg-each-block-anchor/_config.js @@ -0,0 +1,25 @@ +export default { + data: { + foo: ['a'], + bar: ['c'] + }, + + html: ` + <svg> + ...
Each blocks misbehaving inside SVGs [REPL](https://svelte.technology/repl?version=1.39.1&gist=7bac07e911a5116432ff6436ba445916). Checking the checkbox causes the extra ticks to be rendered in front of the `<rect>` elements, incorrectly.
null
2017-09-12 21:15:40+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm install electron@1.8.8 && 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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['runtime svg-each-block-anchor (shared helpers)', 'runtime svg-each-block-anchor (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/dom/preprocess.ts->program->function_declaration:preprocessChildren"]
sveltejs/svelte
845
sveltejs__svelte-845
['840']
129fb150bbffdd1a45e58694228df3ae3fde820b
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 @@ -4,7 +4,7 @@ import annotateWithScopes from '../../utils/annotateWithScopes'; import isReference from '../../utils/isReference'; import { walk } from 'estree-walker'; import d...
diff --git a/test/js/samples/css-shadow-dom-keyframes/_config.js b/test/js/samples/css-shadow-dom-keyframes/_config.js new file mode 100644 --- /dev/null +++ b/test/js/samples/css-shadow-dom-keyframes/_config.js @@ -0,0 +1,5 @@ +export default { + options: { + customElement: true + } +}; \ No newline at end of file di...
Missing '@' in Shadow DOM @keyframes CSS Hi! Thanks for your help with #821. I have an issue [in the same repo](https://github.com/mattdsteele/polymer-cat-paw/tree/svelte); I'm noticing the CSS keyframe animation isn't working - it appears the CSS is stripping off the `@` in `@keyframes`, at least when I compile it to ...
null
2017-09-12 22:26:40+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm install electron@1.8.8 && 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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['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/generators/dom/index.ts->program->function_declaration:dom"]
sveltejs/svelte
851
sveltejs__svelte-851
['850']
049fe5908298c965eacebd37edfc9dfb2a44b474
diff --git a/src/generators/dom/visitors/IfBlock.ts b/src/generators/dom/visitors/IfBlock.ts --- a/src/generators/dom/visitors/IfBlock.ts +++ b/src/generators/dom/visitors/IfBlock.ts @@ -152,7 +152,7 @@ function simple( `if (${name}) ${name}.${mountOrIntro}(${targetNode}, ${anchorNode});` ); - const parentNode =...
diff --git a/test/runtime/samples/component-slot-if-block-before-node/Nested.html b/test/runtime/samples/component-slot-if-block-before-node/Nested.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-if-block-before-node/Nested.html @@ -0,0 +1,3 @@ +<div> + <slot/> +</div> \ No newline at ...
Default slot conditional error This is possibly related to #849. When using a default slot, you have to either wrap conditionals with other tags or have them be the only content inside the component. This fails: https://svelte.technology/repl?version=1.39.2&gist=f30b005debb0daa771e7c612622c1344 But this works...
null
2017-09-16 15:21:46+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm install electron@1.8.8 && 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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['runtime component-slot-if-else-block-before-node (inline helpers)', 'runtime component-slot-if-block-before-node (inline helpers)', 'runtime component-slot-if-block-before-node (shared helpers)', 'runtime component-slot-if-else-block-before-node (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/generators/dom/visitors/IfBlock.ts->program->function_declaration:compound", "src/generators/dom/visitors/IfBlock.ts->program->function_declaration:simple"]
sveltejs/svelte
852
sveltejs__svelte-852
['849']
fbbaff5404908b6691bc71af99a52c81e90e5992
diff --git a/src/validate/html/index.ts b/src/validate/html/index.ts --- a/src/validate/html/index.ts +++ b/src/validate/html/index.ts @@ -11,6 +11,7 @@ const meta = new Map([[':Window', validateWindow]]); export default function validateHtml(validator: Validator, html: Node) { const refs = new Map(); const refCal...
diff --git a/test/validator/samples/component-slotted-each-block/errors.json b/test/validator/samples/component-slotted-each-block/errors.json new file mode 100644 --- /dev/null +++ b/test/validator/samples/component-slotted-each-block/errors.json @@ -0,0 +1,8 @@ +[{ + "message": "Cannot place slotted elements inside a...
Conditional slot errors at runtime Slot content added inside an if currently fails at runtime: https://svelte.technology/repl?version=1.39.2&gist=d4a50532f6a783ada53f35a2b9a7f9e4 This can be easily fixed by moving the condition inside the slot: https://svelte.technology/repl?version=1.39.2&gist=3bf75a560243feecdea...
null
2017-09-16 16:55:59+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm install electron@1.8.8 && 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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['validate component-slotted-each-block', 'validate component-slotted-if-block']
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/validate/html/index.ts->program->function_declaration:validateHtml", "src/validate/html/index.ts->program->function_declaration:validateHtml->function_declaration:visit", "src/validate/html/validateElement.ts->program->function_declaration:validateElement"]
sveltejs/svelte
853
sveltejs__svelte-853
['823']
fbbaff5404908b6691bc71af99a52c81e90e5992
diff --git a/src/generators/Generator.ts b/src/generators/Generator.ts --- a/src/generators/Generator.ts +++ b/src/generators/Generator.ts @@ -56,6 +56,8 @@ export default class Generator { expectedProperties: Set<string>; usesRefs: boolean; + locate: (c: number) => { line: number, column: number }; + styleshee...
diff --git a/test/js/index.js b/test/js/index.js --- a/test/js/index.js +++ b/test/js/index.js @@ -71,7 +71,7 @@ describe("js", () => { expectedBundle.trim().replace(/^\s+$/gm, "") ); }).catch(err => { - console.error(err.loc); + if (err.loc) console.error(err.loc); throw err; }); }); d...
Debugging feature request: marker comments in output It's been talked about in Gitter, but I couldn't find an issue for it yet: debugging Svelte output in bundles would be way easier if each component had marker comments around its code indicating which component the code belonged to. This would make it easier to...
Yes, I've been meaning to do this. Good idea Related suggestion from Gitter — include a comment showing the version of the compiler
2017-09-16 18:25:52+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm install electron@1.8.8 && 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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['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', 'js use-elements-as-anchors', 'js collapses-text-around-comments', 'js input-without-blowback-guard', 'js if-block-simple', 'js onrender-onteardown-rewritt...
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
8
2
10
false
false
["src/generators/Generator.ts->program->class_declaration:Generator->method_definition:constructor", "src/generators/Generator.ts->program->class_declaration:Generator", "src/generators/dom/preprocess.ts->program->function_declaration:createDebuggingComment", "src/generators/dom/preprocess.ts->program->function_declara...
sveltejs/svelte
874
sveltejs__svelte-874
['871']
30f223b54c718d48b6db1d428802d799f3f96147
diff --git a/src/css/Stylesheet.ts b/src/css/Stylesheet.ts --- a/src/css/Stylesheet.ts +++ b/src/css/Stylesheet.ts @@ -120,7 +120,7 @@ class Declaration { } transform(code: MagicString, keyframes: Map<string, string>) { - const property = this.node.property.toLowerCase(); + const property = this.node.property &...
diff --git a/test/css/samples/unknown-at-rule/expected.css b/test/css/samples/unknown-at-rule/expected.css new file mode 100644 --- /dev/null +++ b/test/css/samples/unknown-at-rule/expected.css @@ -0,0 +1 @@ +div[svelte-xyz],[svelte-xyz] div{@apply --funky-div;} \ No newline at end of file diff --git a/test/css/samples...
CSS @apply Rule support The [`@apply`](https://tabatkins.github.io/specs/css-apply-rule/) rule [isn't currently supported by any browser](http://caniuse.com/#feat=css-apply-rule) but in my opinion it is a very useful feature in order to keep styles reusable by sharing global custom sets down to scoped styles. To ov...
My understanding is that `@apply` is effectively dead in the water, which is a shame as it would have been very useful. That notwithstanding, it'd probably be nice if we just disregarded constructs that Svelte doesn't know what to do with (as long as they're parseable by css-tree — beyond those cases, it's probably bet...
2017-09-27 18:23:25+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm install electron@1.8.8 && 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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['css unknown-at-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
Bug Fix
false
true
false
false
3
0
3
false
false
["src/css/Stylesheet.ts->program->class_declaration:Declaration->method_definition:minify", "src/css/Stylesheet.ts->program->class_declaration:Stylesheet->method_definition:constructor", "src/css/Stylesheet.ts->program->class_declaration:Declaration->method_definition:transform"]
sveltejs/svelte
889
sveltejs__svelte-889
['888']
3cac20c1ef98f4685e3f15b002d46267472c9fc8
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 @@ -29,6 +29,7 @@ export default class Block { name: string; expression: Node; context: string; + destructuredContexts?: string[]; comment?: string; key: string; @@ -75,...
diff --git a/test/parser/samples/each-block-destructured/input.html b/test/parser/samples/each-block-destructured/input.html new file mode 100644 --- /dev/null +++ b/test/parser/samples/each-block-destructured/input.html @@ -0,0 +1,3 @@ +{{#each animals as [key, value]}} + <p>{{key}}: {{value}}</p> +{{/each}} diff --gi...
Nice-to-have: Destructuring in each blocks It would be handy if we could destructure the target item of the iterated array, ie ```handlebars {{#each Array.from(map.entries()) as [key, value]}} ... {{/each}} ``` Currently, this results in `ParseError: Expected name`. [REPL](https://svelte.technology/repl?vers...
Recently I met this behavior too.
2017-10-10 01:41:48+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm install electron@1.8.8 && 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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['ssr each-block-destructured-array', 'runtime each-block-destructured-array (inline helpers)', 'runtime each-block-destructured-array (shared helpers)', 'parse each-block-destructured']
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
3
1
4
false
false
["src/generators/server-side-rendering/visitors/EachBlock.ts->program->function_declaration:visitEachBlock", "src/generators/dom/Block.ts->program->class_declaration:Block", "src/generators/dom/Block.ts->program->class_declaration:Block->method_definition:constructor", "src/parse/state/mustache.ts->program->function_de...
sveltejs/svelte
897
sveltejs__svelte-897
['896']
bc8847184089e7040356e7de81a26e49ce94798e
diff --git a/src/generators/dom/preprocess.ts b/src/generators/dom/preprocess.ts --- a/src/generators/dom/preprocess.ts +++ b/src/generators/dom/preprocess.ts @@ -229,12 +229,6 @@ const preprocessors = { const contexts = new Map(block.contexts); contexts.set(node.context, context); - if (node.destructuredConte...
diff --git a/test/runtime/samples/each-block-destructured-array/_config.js b/test/runtime/samples/each-block-destructured-array/_config.js --- a/test/runtime/samples/each-block-destructured-array/_config.js +++ b/test/runtime/samples/each-block-destructured-array/_config.js @@ -9,5 +9,12 @@ export default { html: ` ...
Updates to destructuring each block arrays not rendered [Branch with failing test.](https://github.com/sveltejs/svelte/tree/destructure-each-updates) I'm going to have to poke around some more with this. Representing the destructured array as additional contexts is convenient, but Svelte needs to know when to update...
null
2017-10-18 14:45:34+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm install electron@1.8.8 && 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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['runtime each-block-destructured-array (inline helpers)', 'runtime each-block-destructured-array (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/server-side-rendering/visitors/EachBlock.ts->program->function_declaration:visitEachBlock"]
sveltejs/svelte
906
sveltejs__svelte-906
['905']
1dad8f1936c5ac974854930b32814db907528f56
diff --git a/src/css/Selector.ts b/src/css/Selector.ts --- a/src/css/Selector.ts +++ b/src/css/Selector.ts @@ -224,6 +224,7 @@ function attributeMatches(node: Node, name: string, expectedValue: string, opera if (!attr) return false; if (attr.value === true) return operator === null; if (attr.value.length > 1) ret...
diff --git a/test/css/samples/attribute-selector-only-name/_config.js b/test/css/samples/attribute-selector-only-name/_config.js new file mode 100644 --- /dev/null +++ b/test/css/samples/attribute-selector-only-name/_config.js @@ -0,0 +1,3 @@ +export default { + cascade: false +}; \ No newline at end of file diff --git...
Attribute name only (no value) CSS selector throws if html attribute has a value. This is fine: ```html <button foo></button> <style> button[foo] {} </style> ``` But this throws `TypeError: operators[operator] is not a function`: ```html <button foo="bar"></button> <style> button[foo] {} </style> ...
null
2017-10-25 04:21: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['css attribute-selector-only-name']
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
907
sveltejs__svelte-907
['904']
1dad8f1936c5ac974854930b32814db907528f56
diff --git a/src/generators/Generator.ts b/src/generators/Generator.ts --- a/src/generators/Generator.ts +++ b/src/generators/Generator.ts @@ -509,7 +509,8 @@ export default class Generator { }); const addArrowFunctionExpression = (name: string, node: Node) => { - const { body, params } = node; + co...
diff --git a/test/runtime/samples/oncreate-async-arrow-block/_config.js b/test/runtime/samples/oncreate-async-arrow-block/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/oncreate-async-arrow-block/_config.js @@ -0,0 +1 @@ +export default {}; diff --git a/test/runtime/samples/oncreate-async-arro...
async keyword is removed [REPL](https://svelte.technology/repl?version=1.41.1&gist=7710173c36cc27e97038ee10a4fe62ab). The `async` keyword is removed from the `oncreate` function: ```js export default { async oncreate() { const data = await fetch('foo.json').then(r => r.json()); console.log(data); } ...
PR coming in a few minutes.
2017-10-25 15:35: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['runtime oncreate-async-arrow-block (shared helpers)', 'runtime oncreate-async (shared helpers)', 'runtime oncreate-async-arrow (inline helpers)', 'runtime oncreate-async-arrow (shared helpers)', 'runtime oncreate-async-arrow-block (inline helpers)', 'runtime oncreate-async (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/Generator.ts->program->class_declaration:Generator->method_definition:parseJs"]
sveltejs/svelte
921
sveltejs__svelte-921
['917']
be0837e48011fc73e5a4b0d26a9a11cf8a9d41f4
diff --git a/src/shared/index.js b/src/shared/index.js --- a/src/shared/index.js +++ b/src/shared/index.js @@ -156,9 +156,12 @@ export function _set(newState) { this._state = assign({}, oldState, newState); this._recompute(changed, this._state); if (this._bind) this._bind(changed, this._state); - dispatchObserver...
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 @@ -157,9 +157,12 @@ function...
TypeError: this._fragment is null ```html <!-- App.html --> {{#if show}} <Nested bind:show/> {{else}} <button on:click="set({show:true})">Show it</button> {{/if}} <script> import Nested from './Nested.html'; export default { components: { Nested } }; </script> ``` ```html <!--...
null
2017-11-12 20:55: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['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', 'js use-elements-as-anchors', 'js collapses-text-around-comments', 'js input-without-blowback-guard', 'js component-static', 'js if-block-simple', 'js onre...
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:_set"]
sveltejs/svelte
929
sveltejs__svelte-929
['858']
be0837e48011fc73e5a4b0d26a9a11cf8a9d41f4
diff --git a/src/generators/dom/visitors/Element/Attribute.ts b/src/generators/dom/visitors/Element/Attribute.ts --- a/src/generators/dom/visitors/Element/Attribute.ts +++ b/src/generators/dom/visitors/Element/Attribute.ts @@ -3,7 +3,6 @@ import deindent from '../../../../utils/deindent'; import visitStyleAttribute, {...
diff --git a/test/js/samples/do-use-dataset/expected-bundle.js b/test/js/samples/do-use-dataset/expected-bundle.js new file mode 100644 --- /dev/null +++ b/test/js/samples/do-use-dataset/expected-bundle.js @@ -0,0 +1,236 @@ +function noop() {} + +function assign(target) { + var k, + source, + i = 1, + len = argument...
Use el.dataset.foo = bar instead of setAttribute(el, 'data-foo', bar) [REPL](https://svelte.technology/repl?version=1.39.3&gist=c9f289fc5bd3af71d2137b3a8315b320). `dataset` is supported in all current browsers — we should probably generate this code... ```js div.dataset.foo = "bar"; ``` ...instead of this... ...
null
2017-11-16 09:42: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['js do-use-dataset']
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/generators/dom/visitors/Element/Attribute.ts->program->function_declaration:visitAttribute"]
sveltejs/svelte
931
sveltejs__svelte-931
['928', '928']
4411ab116e71d40ee0aa07c47dbb14164e828fa5
diff --git a/src/generators/dom/preprocess.ts b/src/generators/dom/preprocess.ts --- a/src/generators/dom/preprocess.ts +++ b/src/generators/dom/preprocess.ts @@ -358,6 +358,19 @@ const preprocessors = { } }); + const valueAttribute = node.attributes.find((attribute: Node) => attribute.name === 'value'); + + ...
diff --git a/test/runtime/samples/binding-select-implicit-option-value/_config.js b/test/runtime/samples/binding-select-implicit-option-value/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/binding-select-implicit-option-value/_config.js @@ -0,0 +1,40 @@ +export default { + data: { + values: [...
Bound `<select>` not initialized to proper value when using `<option>`s with implicit values Compare [REPL](https://svelte.technology/repl?version=1.41.3&gist=1b006e3d29beeb5beee0a03b62c31912) vs [REPL](https://svelte.technology/repl?version=1.41.3&gist=ad200757e892b8397fe0661ec71fd8c7). Svelte should probably treat...
Issue found by @petterek. While this is easily worked around, it does seem to be undesirable behavior on Svelte's part. There's actually another subtle bug here: [REPL](https://svelte.technology/repl?version=1.41.3&gist=1e5365904ab01e555858f604981342df) vs [REPL](https://svelte.technology/repl?version=1.41.3&gist=15200...
2017-11-18 19:18: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['runtime binding-select-late (shared helpers)', 'ssr binding-select-initial-value', 'runtime binding-select-initial-value (inline helpers)', 'runtime binding-select-initial-value (shared helpers)', 'runtime binding-select-initial-value-undefined (shared helpers)', 'runtime binding-select-implicit-option-value (shared ...
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/visitors/Element/Element.ts->program->function_declaration:visitElement"]
sveltejs/svelte
932
sveltejs__svelte-932
['927']
0a01aa02433db8c9f724b1a215cd9c0239374de8
diff --git a/src/generators/dom/visitors/EachBlock.ts b/src/generators/dom/visitors/EachBlock.ts --- a/src/generators/dom/visitors/EachBlock.ts +++ b/src/generators/dom/visitors/EachBlock.ts @@ -21,7 +21,7 @@ export default function visitEachBlock( const iterations = block.getUniqueName(`${each}_blocks`); const par...
diff --git a/test/runtime/samples/component-slot-each-block/Nested.html b/test/runtime/samples/component-slot-each-block/Nested.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-each-block/Nested.html @@ -0,0 +1,3 @@ +<div> + <slot/> +</div> \ No newline at end of file diff --git a/test/...
Each block inside slotted content does not get updated I ran across a slight issue with each blocks and slotted content: if the each block outputs directly to a slot, the state updates are not rendered. If the each block is wrapped with an element, it works: https://svelte.technology/repl?version=1.41.3&gist=64a2526...
null
2017-11-18 19:30: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['runtime component-slot-each-block (shared helpers)', 'runtime component-slot-each-block (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/generators/dom/visitors/EachBlock.ts->program->function_declaration:visitEachBlock", "src/generators/dom/visitors/EachBlock.ts->program->function_declaration:keyed", "src/generators/dom/visitors/EachBlock.ts->program->function_declaration:unkeyed"]
sveltejs/svelte
937
sveltejs__svelte-937
['936']
b5821b846a8890952c3f5af2baf29a7e4a42348f
diff --git a/src/validate/html/validateWindow.ts b/src/validate/html/validateWindow.ts --- a/src/validate/html/validateWindow.ts +++ b/src/validate/html/validateWindow.ts @@ -12,6 +12,7 @@ const validBindings = [ 'outerHeight', 'scrollX', 'scrollY', + 'online' ]; export default function validateWindow(validat...
diff --git a/test/validator/samples/window-binding-invalid/errors.json b/test/validator/samples/window-binding-invalid/errors.json --- a/test/validator/samples/window-binding-invalid/errors.json +++ b/test/validator/samples/window-binding-invalid/errors.json @@ -1,5 +1,5 @@ [{ - "message": "'potato' is not a valid bin...
<:Window bind:online/> doesn't work Not sure how I missed this ([REPL](https://svelte.technology/repl?version=1.42.0&gist=72dd99d984ef7f7e7860d942a11f2e0a)). PR inbound
null
2017-11-22 02:19: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['validate window-binding-online', 'validate window-binding-invalid']
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
947
sveltejs__svelte-947
['934']
582315086f4692acbe77fb55d69998b89d6efb64
diff --git a/src/parse/state/mustache.ts b/src/parse/state/mustache.ts --- a/src/parse/state/mustache.ts +++ b/src/parse/state/mustache.ts @@ -1,6 +1,7 @@ import readExpression from '../read/expression'; import { whitespace } from '../../utils/patterns'; import { trimStart, trimEnd } from '../../utils/trim'; +import...
diff --git a/test/validator/samples/each-block-invalid-context-destructured/errors.json b/test/validator/samples/each-block-invalid-context-destructured/errors.json new file mode 100644 --- /dev/null +++ b/test/validator/samples/each-block-invalid-context-destructured/errors.json @@ -0,0 +1,8 @@ +[{ + "message": "'case...
Template syntax for each breaks with reserved words as single-item variables <!-- 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 th...
This is a tricky, err... case. The problem is that acorn (which parses JS on Svelte's behalf) won't parse `case.video`, because it's not actually valid JavaScript. It's not something particular to Svelte — this would be equally impossible: ```js cases.forEach(case => { console.log(case.title); }); ``` We...
2017-11-23 18:32: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['validate each-block-invalid-context-destructured', 'validate each-block-invalid-context']
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/mustache.ts->program->function_declaration:mustache"]
sveltejs/svelte
970
sveltejs__svelte-970
['962']
832311a732f6fee1ae3854630935bacf1947a8e3
diff --git a/src/generators/dom/visitors/Element/addTransitions.ts b/src/generators/dom/visitors/Element/addTransitions.ts --- a/src/generators/dom/visitors/Element/addTransitions.ts +++ b/src/generators/dom/visitors/Element/addTransitions.ts @@ -15,10 +15,9 @@ export default function addTransitions( if (!intro && ...
diff --git a/test/runtime/samples/transition-js-parameterised-with-state/_config.js b/test/runtime/samples/transition-js-parameterised-with-state/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/transition-js-parameterised-with-state/_config.js @@ -0,0 +1,21 @@ +export default { + data: { + dur...
Transitions broken in version 1.43.0 Maybe it's related to the work on #956 None of the transitions work anymore, and we get an error from rollup `Cannot read property 'snippet' of undefined` [This](https://svelte.technology/repl?version=1.43.0&data=JTdCJTIyZ2lzdCUyMiUzQW51bGwlMkMlMjJjb21wb25lbnRzJTIyJTNBJTVCJTd...
**Addendum:** Works perfectly in 1.42.0 but does not work in 1.42.1 @Rich-Harris I think this is not completely solved yet. Compare [this (shows an error message)](https://svelte.technology/repl?version=1.43.1&gist=a3518200eec6390fe7503f542fb362b3) with [this (works perfectly)](https://svelte.technology/repl?versi...
2017-12-03 18:50:42+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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['runtime transition-js-parameterised-with-state (shared helpers)', 'runtime transition-js-parameterised-with-state (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/dom/visitors/Element/addTransitions.ts->program->function_declaration:addTransitions"]
sveltejs/svelte
980
sveltejs__svelte-980
['974']
6641684bcfd6c5b5370320332bd44d047eb9ec87
diff --git a/src/generators/dom/visitors/AwaitBlock.ts b/src/generators/dom/visitors/AwaitBlock.ts --- a/src/generators/dom/visitors/AwaitBlock.ts +++ b/src/generators/dom/visitors/AwaitBlock.ts @@ -67,7 +67,7 @@ export default function visitAwaitBlock( ${old_block}.u(); ${old_block}.d(); ${await_block}....
diff --git a/test/runtime/samples/await-then-catch-anchor/_config.js b/test/runtime/samples/await-then-catch-anchor/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/await-then-catch-anchor/_config.js @@ -0,0 +1,49 @@ +let fulfil; + +let thePromise = new Promise(f => { + fulfil = f; +}); + +expor...
await throws error with null anchor Love the await block, but ran into an issue with cases where an anchor isn't needed (which I think could be relatively often). Example: https://svelte.technology/repl?version=1.44.1&gist=2280c071cccd0dbc9cf0b873540c2c4f I think the following line needs a guard for `null` ancho...
null
2017-12-05 03:00: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['runtime await-then-catch-anchor (shared helpers)', 'runtime await-then-catch-if (shared helpers)', 'runtime await-then-catch-if (inline helpers)', 'runtime await-then-catch-anchor (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/dom/visitors/AwaitBlock.ts->program->function_declaration:visitAwaitBlock"]
sveltejs/svelte
987
sveltejs__svelte-987
['983']
be8bc797d208722c34e81194ab63dd195548dcaf
diff --git a/src/index.ts b/src/index.ts --- a/src/index.ts +++ b/src/index.ts @@ -50,7 +50,7 @@ function parseAttributes(str: string) { return attrs; } -async function replaceTagContents(source, type: 'script' | 'style', preprocessor: Preprocessor) { +async function replaceTagContents(source, type: 'script' | 'st...
diff --git a/test/preprocess/index.js b/test/preprocess/index.js --- a/test/preprocess/index.js +++ b/test/preprocess/index.js @@ -126,6 +126,41 @@ describe('preprocess', () => { }); }); + it('provides filename to processing hooks', () => { + const source = ` + <h1>Hello __MARKUP_FILENAME__!</h1> + <style>....
svelte.preprocess has no file path awareness I am trying to get the new `svelte.preprocess` functionality working with my [`modular-css`](https://github.com/tivac/modular-css) project, but currently none of the hooks know anything about the file they're operating on. This is problematic for anyone who wants to do thing...
null
2017-12-07 18: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['preprocess provides filename to processing hooks']
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/index.ts->program->function_declaration:replaceTagContents", "src/index.ts->program->function_declaration:preprocess"]
sveltejs/svelte
994
sveltejs__svelte-994
['993']
a8eaa7e95c74208907a7f10317ab38c96a5d5b09
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 @@ -289,6 +289,8 @@ export default class Component extends Node { `if (${name}) ${name}._mount(${parentNode || '#target'}, ${parentNode ? 'null' : 'anch...
diff --git a/test/runtime/samples/dynamic-component-inside-element/Bar.html b/test/runtime/samples/dynamic-component-inside-element/Bar.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/dynamic-component-inside-element/Bar.html @@ -0,0 +1 @@ +<p>{{x}}, therefore Bar</p> \ No newline at end of file diff...
<:Component> Inside other tag mount to null Hi, thank for such wonderful project just stumble upon Dynamic component bugs. provided [REPL](https://svelte.technology/repl?version=1.46.0&gist=90b93d44b6713125767cd4941378325f) of bug when <:Component> inside other ```html <div> <:Component {view}></:Component> ...
null
2017-12-10 02:06: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['runtime dynamic-component-inside-element (inline helpers)', 'runtime dynamic-component-inside-element (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/Component.ts->program->class_declaration:Component->method_definition:build"]
sveltejs/svelte
995
sveltejs__svelte-995
['982']
a8eaa7e95c74208907a7f10317ab38c96a5d5b09
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 @@ -83,7 +83,7 @@ export default class Attribute { const isLegacyInputType = this.generator.legacy && name === 'type' && this.parent.name === 'input'; ...
diff --git a/test/js/samples/dont-use-dataset-in-svg/expected-bundle.js b/test/js/samples/dont-use-dataset-in-svg/expected-bundle.js new file mode 100644 --- /dev/null +++ b/test/js/samples/dont-use-dataset-in-svg/expected-bundle.js @@ -0,0 +1,242 @@ +function noop() {} + +function assign(target) { + var k, + source, ...
SVG data attributes cause error in Edge Hi, This example does not work in Edge: https://svelte.technology/repl?version=1.44.2&gist=9c6e3507010663c0ef9e41901736c321 The problem was the attribute `data-name`. By removing it, I got the component to work in Edge. The error it gave was "Cannot set name on undefined or...
null
2017-12-10 02:12: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['js dont-use-dataset-in-svg']
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/Attribute.ts->program->class_declaration:Attribute->method_definition:render"]
sveltejs/svelte
1,000
sveltejs__svelte-1000
['990']
a8eaa7e95c74208907a7f10317ab38c96a5d5b09
diff --git a/src/shared/index.js b/src/shared/index.js --- a/src/shared/index.js +++ b/src/shared/index.js @@ -165,15 +165,15 @@ export function _set(newState) { } } -export function _setDev(newState) { +export function setDev(newState) { if (typeof newState !== 'object') { throw new Error( - this._debugNam...
diff --git a/test/runtime/samples/dev-warning-bad-set-argument/_config.js b/test/runtime/samples/dev-warning-bad-set-argument/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/dev-warning-bad-set-argument/_config.js @@ -0,0 +1,7 @@ +export default { + dev: true, + + error(assert, error) { + asse...
Dev mode protection against this.set(<string>) doesn't work In `dev` mode, svelte wraps `set` calls in `_setDev` which checks to ensure that the first arg is an object, to protect against `this.set("foo", 1)`. Which is great. Except it doesn't currently work due to a quirk of the `set()` implementation. [`set(new...
null
2017-12-10 03:06:09+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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['runtime dev-warning-bad-set-argument (inline helpers)', 'runtime dev-warning-bad-set-argument (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/shared/index.js->program->function_declaration:setDev", "src/shared/index.js->program->function_declaration:_setDev"]
sveltejs/svelte
1,001
sveltejs__svelte-1001
['957']
a8eaa7e95c74208907a7f10317ab38c96a5d5b09
diff --git a/src/parse/state/mustache.ts b/src/parse/state/mustache.ts --- a/src/parse/state/mustache.ts +++ b/src/parse/state/mustache.ts @@ -283,14 +283,22 @@ export default function mustache(parser: Parser) { } } + let awaitBlockShorthand = type === 'AwaitBlock' && parser.eat('then'); + if (awaitBlockShor...
diff --git a/test/runtime/samples/await-then-shorthand/_config.js b/test/runtime/samples/await-then-shorthand/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/await-then-shorthand/_config.js @@ -0,0 +1,45 @@ +let fulfil; + +let thePromise = new Promise(f => { + fulfil = f; +}); + +export default...
await...then shorthand Follow-up to #952. This... ```html {{#await promise then foo}} <p>{{foo}}</p> {{/await}} ``` ...would be a nice shorthand for this: ```html {{#await promise}} <!-- no need to show a pending state --> {{then foo}} <p>{{foo}}</p> {{catch error}} <!-- promise is guaranteed...
I'd recommend an implicit variable as an option, since seeing `await` and `then` together seems strange. Coming from a groovy background we always have `it`: Explicit: ```groovy def myVariable = 'foo' myVariable.with { myVariable -> myVariable == 'foo' } ``` Implicit: ```groovy def myVariable = 'foo'...
2017-12-10 03:37: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['runtime await-then-shorthand (inline helpers)', 'ssr await-then-shorthand', 'runtime await-then-shorthand (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
1
0
1
true
false
["src/parse/state/mustache.ts->program->function_declaration:mustache"]
sveltejs/svelte
1,006
sveltejs__svelte-1006
['1005']
8efd1a923e81128a3a85dd3506e47fa013520d1f
diff --git a/src/server-side-rendering/register.js b/src/server-side-rendering/register.js --- a/src/server-side-rendering/register.js +++ b/src/server-side-rendering/register.js @@ -26,10 +26,14 @@ function _deregister(extension) { function _register(extension) { require.extensions[extension] = function(module, f...
diff --git a/test/helpers.js b/test/helpers.js --- a/test/helpers.js +++ b/test/helpers.js @@ -175,11 +175,17 @@ function capitalise(str) { export function showOutput(cwd, options = {}, s = svelte) { glob.sync('**/*.html', { cwd }).forEach(file => { if (file[0] === '_') return; + + const name = path.basename(fil...
ssr/register should sanitize filenames This doesn't work: ```js require('svelte/ssr/register'); const Thing = require('./pages/:thing.html'); ``` We get this error: > options.name must be a valid identifier
null
2017-12-11 03:33: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['ssr sanitize-name']
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/server-side-rendering/register.js->program->function_declaration:_register"]
sveltejs/svelte
1,017
sveltejs__svelte-1017
['1007']
76356cef00b924fc2b9176eb3bf6f2acdd5ce695
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 @@ -29,7 +29,7 @@ export default class Element extends Node { this.cannotUseInnerHTML(); } - const parentElement = this.parent && this.parent.findNearest('...
diff --git a/test/runtime/samples/component-slot-empty/Nested.html b/test/runtime/samples/component-slot-empty/Nested.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-empty/Nested.html @@ -0,0 +1 @@ +<p>no slot here</p> \ No newline at end of file diff --git a/test/runtime/samples/compo...
Regression in 1.47.0 with empty default slots [This REPL](https://svelte.technology/repl?version=1.47.0&gist=9eef46e2ee66b098bfca26d29ab47017) fails with `Cannot read property 'default' of undefined` but works in `<= v1.46.0` The following ways of adding components in `v1.47.0` work: ``` <Person :data :foo :bar...
It looks like there are a couple things going on here. - Trying to send a default slot into a component that isn't set up to use it (by containing `<slot/>` somewhere in its definition) will result in that runtime error. This is also present in 1.46.0 - Whitespace-only content is treated as no content for the defau...
2017-12-13 00:48: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['runtime component-slot-empty (shared helpers)', 'runtime component-slot-empty (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
5
0
5
false
false
["src/generators/nodes/Text.ts->program->function_declaration:shouldSkip", "src/generators/nodes/Element.ts->program->class_declaration:Element->method_definition:init", "src/generators/nodes/shared/Node.ts->program->class_declaration:Node->method_definition:findNearest", "src/generators/nodes/Element.ts->program->clas...
sveltejs/svelte
1,018
sveltejs__svelte-1018
['1014']
76356cef00b924fc2b9176eb3bf6f2acdd5ce695
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 @@ -69,6 +69,7 @@ export default class AwaitBlock extends Node { const name = this.var; const anchor = this.getOrCreateAnchor(block, parentNode);...
diff --git a/test/runtime/samples/await-then-catch-in-slot/Foo.html b/test/runtime/samples/await-then-catch-in-slot/Foo.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/await-then-catch-in-slot/Foo.html @@ -0,0 +1 @@ +<slot></slot> \ No newline at end of file diff --git a/test/runtime/samples/await-th...
await blocks break inside components [REPL](https://svelte.technology/repl?version=1.47.1&gist=a27426d394dbea15e7100cac856936a9). If the `await` block is wrapped in an element, it works fine, but not as the direct child of a component.
null
2017-12-13 01:02: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
['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru...
['runtime await-then-catch-in-slot (inline helpers)', 'runtime await-then-catch-in-slot (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/AwaitBlock.ts->program->class_declaration:AwaitBlock->method_definition:build"]
sveltejs/svelte
1,046
sveltejs__svelte-1046
['1044', '1044']
4202c56d8e886715eb653da489be41729f8703ce
diff --git a/src/generators/server-side-rendering/index.ts b/src/generators/server-side-rendering/index.ts --- a/src/generators/server-side-rendering/index.ts +++ b/src/generators/server-side-rendering/index.ts @@ -124,7 +124,7 @@ export default function ssr( head: result.head, css: { code: cssCode, map: null...
diff --git a/test/js/samples/ssr-no-oncreate-etc/expected-bundle.js b/test/js/samples/ssr-no-oncreate-etc/expected-bundle.js --- a/test/js/samples/ssr-no-oncreate-etc/expected-bundle.js +++ b/test/js/samples/ssr-no-oncreate-etc/expected-bundle.js @@ -25,7 +25,7 @@ SvelteComponent.render = function(state, options = {}) ...
SSR component render() toString method returns undefined When using `${app.render()}` in a template literal, I get undefined. That seems to be caused by a bug in `toString()`: ``` var result = { head: '', addComponent: addComponent }; ... var html = AddToCart._render(result, state, options); return { html: ht...
2017-12-24 16:19:21+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...
['ssr textarea-children', 'ssr triple', 'ssr component-binding', 'ssr component-with-different-extension', 'ssr directives', 'ssr head-title', 'ssr static-text', 'ssr component-data-dynamic', 'ssr component-refs', 'ssr if-block-false', 'ssr component', 'ssr styles-nested', 'ssr textarea-value', 'ssr default-data', 'ssr...
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/server-side-rendering/index.ts->program->function_declaration:ssr"]
sveltejs/svelte
1,047
sveltejs__svelte-1047
['1040']
84721421590f015db6e18c786070dbaa555588c7
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 @@ -256,13 +256,13 @@ export default class Component extends Node { var ${switch_vars.value} = ${snippet}; function ${switch_vars.props}(${params...
diff --git a/test/runtime/samples/dynamic-component-bindings-recreated/Green.html b/test/runtime/samples/dynamic-component-bindings-recreated/Green.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/dynamic-component-bindings-recreated/Green.html @@ -0,0 +1 @@ +<p>green {{foo}}</p> \ No newline at end o...
Two-way data binding issue with dynamic components REPL: https://svelte.technology/repl?version=1.49.1&gist=7e3783cd296545111c21728d131c1c06 Seems like when you do a two-way binding, it reverts back to the original data when a component is switched. However, if it is just a one-way data binding, it works as expec...
null
2017-12-24 16:59: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 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 dynamic-component-bindings-recreated (shared helpers , hydration)', 'runtime dynamic-component-bindings-recreated (inline helpers)', 'runtime dynamic-component-bindings-recreated (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/Component.ts->program->class_declaration:Component->method_definition:build"]
sveltejs/svelte
1,048
sveltejs__svelte-1048
['1022']
84721421590f015db6e18c786070dbaa555588c7
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 @@ -55,7 +55,7 @@ export default class Element extends Node { attribute.name === 'value' ) { let select = this.parent; - while (select &...
diff --git a/test/runtime/samples/option-without-select/_config.js b/test/runtime/samples/option-without-select/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/option-without-select/_config.js @@ -0,0 +1,14 @@ +export default { + data: { + foo: 'hello' + }, + + html: `<option value='hello'>hel...
<option> outside of <select> throws error Using svelte 1.47.2 and 1.45.0. REPL: https://svelte.technology/repl?version=1.47.2&gist=7d15de2a904b723c8c0395a1dee35df8 When an `<option>` element is not contained in a `<select>` (or any element for that matter), it throws an error as the special handling for `<option>...
Interesting, this doesn't happen in 1.44.0: https://svelte.technology/repl?version=1.44.0&gist=d6fadd5e8b755b8d0fb7301d61a727c7
2017-12-24 17:11: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 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 option-without-select (inline helpers)', 'runtime option-without-select (shared helpers)', 'runtime option-without-select (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/Element.ts->program->class_declaration:Element->method_definition:init"]
sveltejs/svelte
1,049
sveltejs__svelte-1049
['1032']
831cc411a1be0e56339ea76975831f35e785f461
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 @@ -14,6 +14,7 @@ export interface BlockOptions { comment?: string; key?: string; contexts?: Map<string, string>; + contextTypes?: Map<string, string>; indexes?: Map<string,...
diff --git a/test/runtime/samples/await-then-catch-event/_config.js b/test/runtime/samples/await-then-catch-event/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/await-then-catch-event/_config.js @@ -0,0 +1,45 @@ +let fulfil; +let thePromise = new Promise(f => { + fulfil = f; +}); + +export def...
Methods in await block aren't bound to data ``` VM637:126 Uncaught TypeError: Cannot read property 'undefined' of undefined at HTMLParagraphElement.click_handler (eval at n.createComponent (Viewer.html:241), <anonymous>:126:95) click_handler @ VM637:126 ``` Example here https://svelte.technology/repl?vers...
null
2017-12-24 17:46: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...
['runtime await-then-catch-event (inline helpers)', 'runtime await-then-catch-event (shared helpers , hydration)', 'runtime await-then-catch-event (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
4
1
5
false
false
["src/generators/nodes/AwaitBlock.ts->program->class_declaration:AwaitBlock->method_definition:init", "src/generators/dom/Block.ts->program->class_declaration:Block", "src/generators/dom/Block.ts->program->class_declaration:Block->method_definition:constructor", "src/generators/nodes/Element.ts->program->class_declarat...
sveltejs/svelte
1,050
sveltejs__svelte-1050
['1039']
37f8f8afe31cfde4718dc946330eecd3b4ea715b
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 @@ -212,10 +212,12 @@ export default function dom( ${generator.metaBindings} ${computations.length && `this._recompute({ ${Array.from(computationDeps).map(dep => `${dep}: 1`)....
diff --git a/test/runtime/samples/dev-warning-dynamic-components-misplaced/Bar.html b/test/runtime/samples/dev-warning-dynamic-components-misplaced/Bar.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/dev-warning-dynamic-components-misplaced/Bar.html @@ -0,0 +1 @@ +Bar \ No newline at end of file diff...
Detect when dynamic components are in `components` and not `data` [This](https://svelte.technology/repl?version=1.49.1&gist=d5a190af6c510194a969ebe458ac2b1f) is incorrect, but it's not immediately obvious why (it took me a while to figure out). The component constructors need to be in `data`, *not* `components` — [l...
Do they have to be in `data`? I mean, can we not find a way around of leaving them in `components`. I suppose this might mean components keeping track of all their children, but that might be better in the long run when HMR is introduced (maybe) > can we not find a way around of leaving them in components The ...
2017-12-24 18:41: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 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-dynamic-components-misplaced (shared helpers , hydration)', 'ssr dev-warning-dynamic-components-misplaced', 'runtime dev-warning-dynamic-components-misplaced (shared helpers)', 'runtime dev-warning-dynamic-components-misplaced (inline helpers)', 'validate component-unused']
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
5
1
6
false
false
["src/generators/dom/index.ts->program->function_declaration:dom", "src/validate/index.ts->program->function_declaration:validate", "src/validate/index.ts->program->class_declaration:Validator", "src/validate/html/validateElement.ts->program->function_declaration:validateElement", "src/validate/index.ts->program->class...
sveltejs/svelte
1,052
sveltejs__svelte-1052
['1051', '1039', '1051']
37f8f8afe31cfde4718dc946330eecd3b4ea715b
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 @@ -212,10 +212,12 @@ export default function dom( ${generator.metaBindings} ${computations.length && `this._recompute({ ${Array.from(computationDeps).map(dep => `${dep}: 1`)....
diff --git a/test/runtime/samples/dev-warning-dynamic-components-misplaced/Bar.html b/test/runtime/samples/dev-warning-dynamic-components-misplaced/Bar.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/dev-warning-dynamic-components-misplaced/Bar.html @@ -0,0 +1 @@ +Bar \ No newline at end of file diff...
Detect unused helpers, events, transitions It occurred to me while doing #1050 that we could also detect unused helpers, events and transitions. I *think* that's all — we can't make any assumptions about computed properties and methods, since they could be being used outside the component. Detect when dynamic component...
Do they have to be in `data`? I mean, can we not find a way around of leaving them in `components`. I suppose this might mean components keeping track of all their children, but that might be better in the long run when HMR is introduced (maybe) > can we not find a way around of leaving them in components The...
2017-12-24 19:00: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 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-dynamic-components-misplaced (shared helpers , hydration)', 'ssr dev-warning-dynamic-components-misplaced', 'runtime dev-warning-dynamic-components-misplaced (shared helpers)', 'validate unused-transition', 'runtime dev-warning-dynamic-components-misplaced (inline helpers)', 'validate unused-compo...
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
5
1
6
false
false
["src/generators/dom/index.ts->program->function_declaration:dom", "src/validate/index.ts->program->function_declaration:validate", "src/validate/index.ts->program->class_declaration:Validator", "src/validate/html/validateElement.ts->program->function_declaration:validateElement", "src/validate/index.ts->program->class...
sveltejs/svelte
1,054
sveltejs__svelte-1054
['1026']
37f8f8afe31cfde4718dc946330eecd3b4ea715b
diff --git a/src/generators/nodes/Text.ts b/src/generators/nodes/Text.ts --- a/src/generators/nodes/Text.ts +++ b/src/generators/nodes/Text.ts @@ -19,9 +19,10 @@ const elementsWithoutText = new Set([ function shouldSkip(node: Text) { if (/\S/.test(node.data)) return false; - const parentElement = node.findNearest(...
diff --git a/test/js/samples/head-no-whitespace/expected-bundle.js b/test/js/samples/head-no-whitespace/expected-bundle.js new file mode 100644 --- /dev/null +++ b/test/js/samples/head-no-whitespace/expected-bundle.js @@ -0,0 +1,231 @@ +function noop() {} + +function assign(target) { + var k, + source, + i = 1, + le...
Remove whitespace nodes inside <:Head> Whitespace is irrelevant inside `<head>`, so it should be removed.
null
2017-12-25 01: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 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 head-no-whitespace']
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/Text.ts->program->function_declaration:shouldSkip"]
sveltejs/svelte
1,059
sveltejs__svelte-1059
['54']
8b5dba9f4a9dce79ece0b4cb4f9eabb54d540634
diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ The Svelte compiler optionally takes a second argument, an object of configurati | `hydratable` | `true`, `false` | Whether to support hydration on the compiled component. | `false` | | `customElement` | `true`, `false`, `{ tag, prop...
diff --git a/test/parser/index.js b/test/parser/index.js --- a/test/parser/index.js +++ b/test/parser/index.js @@ -1,6 +1,6 @@ import assert from 'assert'; import fs from 'fs'; -import { svelte } from '../helpers.js'; +import { svelte, tryToLoadJson } from '../helpers.js'; describe('parse', () => { fs.readdirSyn...
Option to prevent two-way binding? A lot of people have internalized the FUD around two-way binding to the extent that they're turned off Svelte altogether, notwithstanding the fact that it's optional and explicitly opt-in. I wonder if the compiler should have an option that prevents bindings from being used, so the 'w...
I would welcome this, have never like two-way binding. I like two-way binding when I want it. Here's a scenario that I often run into: I have an edit form. I want it to edit a copy, and only commit the edits when the user saves. I want 2-way binding on that copy, but it shouldn't update the original (in some global ...
2017-12-30 15:39: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 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...
['parse error-binding-disabled']
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
2
1
3
false
false
["src/parse/index.ts->program->class_declaration:Parser->method_definition:constructor", "src/parse/state/tag.ts->program->function_declaration:tag", "src/parse/index.ts->program->class_declaration:Parser"]
sveltejs/svelte
1,064
sveltejs__svelte-1064
['1063', '1063']
b0d7dbcbad48b8cf62d84590c557e5b3fc0bea7a
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 @@ -97,6 +97,9 @@ export default function dom( parsed.html.build(); const { block } = parsed.html; + // prevent fragment being created twice (#1063) + if (options.customElemen...
diff --git a/test/custom-elements/index.js b/test/custom-elements/index.js --- a/test/custom-elements/index.js +++ b/test/custom-elements/index.js @@ -19,6 +19,10 @@ describe('custom-elements', function() { const nightmare = new Nightmare({ show: false }); + nightmare.on('console', (type, ...args) => { + console...
Nested custom element fragments are created twice Custom element constructors always call `this._fragment.c()`, because they don't need a `target`. But then if a custom element is referenced as a Svelte component... ```html <ThisIsCompiledAsACustomElement/> ``` ...then the parent will call `thisiscompiledasacus...
2018-01-02 04:03: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...
['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/generators/dom/index.ts->program->function_declaration:dom"]
sveltejs/svelte
1,072
sveltejs__svelte-1072
['1071']
70ce51df5c03f94a8603772ef70f6e49c9dcf4fa
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 @@ -1,3 +1,4 @@ +import CodeBuilder from '../../utils/CodeBuilder'; import deindent from '../../utils/deindent'; import { stringify } from '../../utils/stringify'; im...
diff --git a/test/js/samples/window-binding-scroll/expected-bundle.js b/test/js/samples/window-binding-scroll/expected-bundle.js --- a/test/js/samples/window-binding-scroll/expected-bundle.js +++ b/test/js/samples/window-binding-scroll/expected-bundle.js @@ -190,9 +190,10 @@ var proto = { /* generated by Svelte vX.Y...
Possible issue with binding back on <:Window> variables See this REPL: https://svelte.technology/repl?version=1.50.1&gist=a2de5017bab2f388b03e81e91b41fbd9 Have to use indirection to set variables back on the window object. Discussion here: https://gitter.im/sveltejs/svelte?at=5a4ec8dc03838b2f2a70ce8d
null
2018-01-05 02: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']
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/Window.ts->program->class_declaration:Window->method_definition:build"]
sveltejs/svelte
1,073
sveltejs__svelte-1073
['1066']
70ce51df5c03f94a8603772ef70f6e49c9dcf4fa
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 @@ -1,5 +1,5 @@ import deindent from '../../utils/deindent'; -import { stringify } from '../../utils/stringify'; +import { stringify, escapeHTML } from '../../utils...
diff --git a/test/runtime/samples/html-entities-inside-elements/_config.js b/test/runtime/samples/html-entities-inside-elements/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/html-entities-inside-elements/_config.js @@ -0,0 +1,5 @@ +export default { + html: ` + <p>this &lt;em&gt;should&lt;/em...
HTML entities treated incorrectly ~~When compiling to custom elements~~, markup [like this](https://svelte.technology/repl?version=1.50.1&gist=ede18c4c99e716c26ecf5074a50645e2)... ```html <p>this should not be &lt;strong&gt;bold&lt;/strong&gt;</p> ``` ...is treated incorrectly — a `<strong>` element appears whe...
null
2018-01-05 03:34: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 html-entities-inside-elements (shared helpers , hydration)', 'runtime html-entities-inside-elements (shared helpers)', 'runtime html-entities-inside-elements (inline helpers)', 'ssr html-entities-inside-elements']
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/server-side-rendering/visitors/Text.ts->program->function_declaration:visitText", "src/generators/nodes/Element.ts->program->class_declaration:Element->method_definition:build->function_declaration:toHTML", "src/utils/stringify.ts->program->function_declaration:escapeHTML"]
sveltejs/svelte
1,095
sveltejs__svelte-1095
['1062']
9cfa1747036607debd8502018681fa5697f1d5bf
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 @@ -43,7 +43,7 @@ export default class Attribute { render(block: Block) { const node = this.parent; - const name = this.name; + const name = fixCasi...
diff --git a/test/runtime/samples/attribute-casing/_config.js b/test/runtime/samples/attribute-casing/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/attribute-casing/_config.js @@ -0,0 +1,17 @@ +export default { + html: ` + <div class='SHOUTY'>YELL</div> + + <svg viewBox='0 0 100 100'> + <...
case-sensitivity of SVG viewBox likely to cause silent errors In most 'try online' tools, the SVG `viewBox` attribute is handled the same whether properly camel-cased or not (`viewbox`). Svelte only recognizes `viewBox`. This can make it difficult for developers new to SVG - especially when they are starting with rando...
I take it from what's been said on the closed PR #1077 that what we'd want to do is lowercase all of the attribute names in HTML, and to lowercase SVG ones, apart from those with mixed case [here](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute) and to instead make those conform to the case in that list?
2018-01-11 03:34: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 attribute-casing (inline helpers)', 'runtime attribute-casing (shared helpers , hydration)', 'runtime attribute-casing (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->function_declaration:fixCasing", "src/generators/nodes/Attribute.ts->program->class_declaration:Attribute->method_definition:render", "src/generators/nodes/Attribute.ts->program->function_declaration:isDynamic"]
sveltejs/svelte
1,112
sveltejs__svelte-1112
['1110']
8057884cb64f6c2cdf837411bc3962daf69e2bb5
diff --git a/src/validate/html/index.ts b/src/validate/html/index.ts --- a/src/validate/html/index.ts +++ b/src/validate/html/index.ts @@ -19,14 +19,29 @@ export default function validateHtml(validator: Validator, html: Node) { const elementStack: Node[] = []; function visit(node: Node) { - a11y(validator, node,...
diff --git a/test/validator/samples/a11y-not-on-components/input.html b/test/validator/samples/a11y-not-on-components/input.html new file mode 100644 --- /dev/null +++ b/test/validator/samples/a11y-not-on-components/input.html @@ -0,0 +1,9 @@ +<Widget scope="foo"> + <input autofocus> +</Widget> + +<script> + export def...
Ignore a11y checks on child components I just encountered an interesting "bug" of the a11y implementation. I have a component that uses scope as the prop name, and I get a warning that The scope attribute should only be used with <th> elements. I feel that a11y should be disabled on component definitions. Here's the fu...
At least until Svelte v2, we are merely suggesting and not enforcing that component names begin with a capital letter and regular elements begin with a lowercase letter. So we have to check whether the given element is actually intended as a component before skipping the a11y checks. `validateElement.ts` has a check fo...
2018-01-16 19:42: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...
['validate a11y-not-on-components']
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/validate/html/index.ts->program->function_declaration:validateHtml->function_declaration:visit", "src/validate/html/validateElement.ts->program->function_declaration:validateElement", "src/validate/html/validateHead.ts->program->function_declaration:validateHead"]
sveltejs/svelte
1,116
sveltejs__svelte-1116
['1107']
8057884cb64f6c2cdf837411bc3962daf69e2bb5
diff --git a/src/generators/server-side-rendering/index.ts b/src/generators/server-side-rendering/index.ts --- a/src/generators/server-side-rendering/index.ts +++ b/src/generators/server-side-rendering/index.ts @@ -114,7 +114,6 @@ export default function ssr( } var result = { head: '', addComponent }; - ${t...
diff --git a/test/runtime/samples/store-nested/Nested.html b/test/runtime/samples/store-nested/Nested.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/store-nested/Nested.html @@ -0,0 +1,13 @@ +<h1>Hello, {{$name}}!</h1> + +<script> + import { Store } from '../../../../store.js'; + + export defau...
can't supply store to nested components server side Hey, I'm trying to pass a store to a nested component which works well ordinarily, but it fails when server rendering it. E.g. I have a manage account page like so: ```html <div class="page"> <h1>Manage Account</h1> <div> <h3>Two Factor Auth<...
Sorry I'm not answering your question in full, but just a quick pointer, generally speaking using the underlying internals (anything starting with `_` such as `_init`) is frowned upon. The suggested approach is to use the official API. If you think there's something missing from the API to make the above possible, brin...
2018-01-17 18:16: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 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...
['ssr store-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/server-side-rendering/index.ts->program->function_declaration:ssr"]