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
3,762
sveltejs__svelte-3762
['3761']
ebf7a9024a47a5dd40a9e43c6c589bb6c1ffa449
diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -433,6 +433,19 @@ Out of the box, Svelte will interpolate between two numbers, two arrays or two o --- +If the initial value is `undefined` or `null`, th...
diff --git a/test/motion/index.js b/test/motion/index.js new file mode 100644 --- /dev/null +++ b/test/motion/index.js @@ -0,0 +1,23 @@ +import * as assert from 'assert'; +import { get } from '../../store'; +import { spring, tweened } from '../../motion'; + +describe('motion', () => { + describe('spring', () => { + it...
Allow spring/tweened values to be initially undefined **Is your feature request related to a problem? Please describe.** When using springs and tweens to describe values that are set from props, I find myself doing this sort of thing: ```html <script> import { spring } from 'svelte/motion'; export let big ...
null
2019-10-21 19:34: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 prop-without-semicolon ', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr ...
['motion spring handles initially undefined values', 'motion tweened handles initially undefined values']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Feature
false
true
false
false
4
0
4
false
false
["src/runtime/motion/spring.ts->program->function_declaration:spring->function_declaration:set", "src/runtime/motion/tweened.ts->program->function_declaration:tweened", "src/runtime/motion/spring.ts->program->function_declaration:spring", "src/runtime/motion/tweened.ts->program->function_declaration:tweened->function_d...
sveltejs/svelte
3,775
sveltejs__svelte-3775
['3764']
d91e9afab6fbaf85d0263111ce4b64932b7e5e09
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ * Throw exception immediately when calling `createEventDispatcher()` after component instantiation ([#3667](https://github.com/sveltejs/svelte/pull/3667)) * Fix globals shadowing contextual template scope ([#3674](https:/...
diff --git a/test/runtime/samples/attribute-boolean-case-insensitive/_config.js b/test/runtime/samples/attribute-boolean-case-insensitive/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/attribute-boolean-case-insensitive/_config.js @@ -0,0 +1,3 @@ +export default { + html: `<input readonly>` +}...
Spread properties on inputs have unexpected readonly attributes **Describe the bug** Spread properties on `<input>` tags can have an unexpected behavior on readonly attributes. If a tag has `readonly={false}` along with a spread, then the readonly attribute is included in the tag as `readonly="false"`. This results in...
If any of the attributes on an element are spread attributes, we're currently bailing on all of the logic we have for which attributes are boolean and should be set via properties. We need to continue using properties where appropriate. I'm guessing the `AttributeWrapper` should expose a method that indicates whethe...
2019-10-23 11:43:15+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['ssr attribute-boolean-case-insensitive', 'runtime attribute-boolean-with-spread ', 'runtime spread-element-removal (with hydration)', 'runtime spread-element-removal ', 'ssr spread-element-removal', 'runtime attribute-boolean-with-spread (with hydration)', 'ssr attribute-boolean-with-spread']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
6
2
8
false
false
["src/compiler/compile/render_dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:add_spread_attributes", "src/runtime/internal/ssr.ts->program->function_declaration:spread", "src/compiler/compile/nodes/Attribute.ts->program->class_declaration:Attribute", "src/compiler/compile/re...
sveltejs/svelte
3,781
sveltejs__svelte-3781
['3421']
5dbb08d19b9ec85b49cc90f0a091a5638ee33631
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Fix `{#each}` context not shadowing outer scope when using `bind:` ([#1565](https://github.com/sveltejs/svelte/issues/1565)) * Fix edge cases in matching selectors against elements ([#1710](https://github.com/sveltejs/sve...
diff --git a/test/runtime/samples/spread-element-class/_config.js b/test/runtime/samples/spread-element-class/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/spread-element-class/_config.js @@ -0,0 +1,7 @@ +export default { + html: `<div class='foo bar'>hello</div>`, + test({ assert, component,...
class:name={ true } in combination with spread arguments is deleted on update **Describe the bug** `class:name={ true }` in combination with spread arguments is deleted on spread arguments update **To Reproduce** REPL https://svelte.dev/repl/ff608fce63184816a57bbb5ae0ea7bd3?version=3.8.1 **Additional context** ...
null
2019-10-23 20:38:22+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime spread-element-class ', 'runtime spread-element-class (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:add_classes"]
sveltejs/svelte
3,792
sveltejs__svelte-3792
['3790', '2721']
33c8cd33292405af00a500c2b860ce4b6e29e535
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,8 @@ * Fix `{#each}` context not shadowing outer scope when using `bind:` ([#1565](https://github.com/sveltejs/svelte/issues/1565)) * Fix edge cases in matching selectors against elements ([#1710](https://github.com/sveltejs/s...
diff --git a/test/runtime/samples/spread-element-class/main.svelte b/test/runtime/samples/spread-element-class/main.svelte --- a/test/runtime/samples/spread-element-class/main.svelte +++ b/test/runtime/samples/spread-element-class/main.svelte @@ -2,4 +2,4 @@ export let blah = 'hello'; </script> -<div class='foo' c...
Spread and scoping class problems ```svelte <style> div { color: red; } .bar { font-weight: bold; } </style> <div {...{ class: 'bar' }} class='foo'> This is red. </div> <div class='foo' {...{ class: 'qux' }}> This should be red. It's not because the spread clobbers the scoping class attached to the c...
Hi @trbrc! Thank you so much for reporting this! When you add the `this-class-breaks-the-spread` class to your component, the `p1_levels` array goes from this: ```javascript var p1_levels = [ctx.spread]; ``` To this: ```javascript var p1_levels = [ctx.spread, { class: "svelte-1yjig6f" }]; ``` Right af...
2019-10-25 12:55: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
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime spread-element-scope ', 'runtime spread-element-scope (with hydration)', 'ssr spread-element-scope', 'ssr spread-element-class']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
4
2
6
false
false
["src/runtime/internal/ssr.ts->program->function_declaration:spread", "src/compiler/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:add_css_class", "src/compiler/compile/render_dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper", "src/compiler/compile/nodes/Element....
sveltejs/svelte
3,811
sveltejs__svelte-3811
['3508']
e55bf4013df1df1cb034f1c59c21d4e664b3aa98
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Also: * Fix edge cases in matching selectors against elements ([#1710](https://github.com/sveltejs/svelte/issues/1710)) * Fix several bugs related to interaction of `{...spread}` attributes with other features ([#2721](ht...
diff --git a/test/js/samples/action-custom-event-handler/expected.js b/test/js/samples/action-custom-event-handler/expected.js --- a/test/js/samples/action-custom-event-handler/expected.js +++ b/test/js/samples/action-custom-event-handler/expected.js @@ -39,7 +39,7 @@ function handleFoo(bar) { } function foo(node, ...
Binding to an aliased property results in null value **Describe the bug** If a component exports a property using an alias such as `export { alias as name }`, then binding to that property will fail. **To Reproduce** https://svelte.dev/repl/e694e7e20f044deabaf55ff659a1e41e?version=3.9.2 **Expected behavior** ...
Hi @WHenderson, I fixed this issue here: https://github.com/sveltejs/svelte/pull/3573 Hi @Conduitry any news about that? Thanks! It might be possible to optimize this a little more in the common case of no aliased props, but one way to handle this seems to be to make the final `prop_names` array argument to `init()`...
2019-10-28 00:33:52+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['js window-binding-scroll', 'js inline-style-optimized-multiple', 'js component-store-access-invalidate', 'js debug-no-dependencies', 'js reactive-values-non-topologically-ordered', 'js transition-local', 'js window-binding-online', 'js bind-online', 'js component-store-file-invalidate', 'js data-attribute', 'js react...
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/runtime/internal/Component.ts->program->function_declaration:init", "src/compiler/compile/render_dom/index.ts->program->function_declaration:dom", "src/runtime/internal/dom.ts->program->function_declaration:object_without_properties", "src/runtime/internal/Component.ts->program->function_declaration:bind"]
sveltejs/svelte
3,818
sveltejs__svelte-3818
['3801']
f849408a944d9ffae693f6c9e3f6765cb57f0b7c
diff --git a/src/compiler/parse/read/style.ts b/src/compiler/parse/read/style.ts --- a/src/compiler/parse/read/style.ts +++ b/src/compiler/parse/read/style.ts @@ -47,6 +47,13 @@ export default function read_style(parser: Parser, start: number, attributes: No } } + if (node.type === 'Declaration' && node.va...
diff --git a/test/validator/samples/invalid-empty-css-declaration/errors.json b/test/validator/samples/invalid-empty-css-declaration/errors.json new file mode 100644 --- /dev/null +++ b/test/validator/samples/invalid-empty-css-declaration/errors.json @@ -0,0 +1,12 @@ +[{ + "code": "invalid-declaration", + "message": "D...
Confusing error message "TypeError: Cannot read property 'start' of undefined" with invalid css By mistake I had this invalid css in my component: ```css <style> .no-wrap { word-wrap: ; } </style> ``` With latest 3.12.1 I get the following compilation error: ``` Running: 'node_modules/.bin/rollup -c...
null
2019-10-28 14:39: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['validate invalid-empty-css-declaration']
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/compiler/parse/read/style.ts->program->function_declaration:read_style"]
sveltejs/svelte
3,849
sveltejs__svelte-3849
['3828']
601ec45780aeec8d4f62e6438ff1af974ce25c39
diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts --- a/src/compiler/compile/nodes/Element.ts +++ b/src/compiler/compile/nodes/Element.ts @@ -151,6 +151,10 @@ export default class Element extends Node { } } + // Binding relies on Attribute, defer its evaluation + cons...
diff --git a/test/js/samples/bindings-readonly-order/expected.js b/test/js/samples/bindings-readonly-order/expected.js new file mode 100644 --- /dev/null +++ b/test/js/samples/bindings-readonly-order/expected.js @@ -0,0 +1,82 @@ +import { + SvelteComponent, + attr, + detach, + element, + init, + insert, + listen, + noo...
File input binding fails if type declared last **Describe the bug** `<input type=file bind:files>` works. `<input bind:files type=file>` doesn't. Via [Stack Overflow](https://stackoverflow.com/questions/58634083/order-of-html-element-bindings-in-svelte) **Logs** > Value being assigned to HTMLInputElement.files d...
This is the diff in the output code: <img width="1440" alt="Screenshot 2019-11-02 at 14 34 15" src="https://user-images.githubusercontent.com/216566/68072456-e5397c80-fd7d-11e9-94e7-8844b920de0c.png">
2019-11-04 17:09: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['js bindings-readonly-order']
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/compiler/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:constructor"]
sveltejs/svelte
3,884
sveltejs__svelte-3884
['3882']
1dfd42c3f43b6dd98012e78d1bd5d9d913ececde
diff --git a/src/compiler/compile/render_dom/wrappers/Element/index.ts b/src/compiler/compile/render_dom/wrappers/Element/index.ts --- a/src/compiler/compile/render_dom/wrappers/Element/index.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/index.ts @@ -121,6 +121,7 @@ export default class ElementWrapper exten...
diff --git a/test/js/samples/hydrated-void-element/_config.js b/test/js/samples/hydrated-void-element/_config.js new file mode 100644 --- /dev/null +++ b/test/js/samples/hydrated-void-element/_config.js @@ -0,0 +1,5 @@ +export default { + options: { + hydratable: true + } +}; \ No newline at end of file diff --git a/t...
Void element 'children' get hydrated **Describe the bug** Svelte generates code that hydrates the children of `<img>` elements and other void elements, even though there can't be any by definition. **To Reproduce** https://svelte.dev/repl/f5c696a56a234934a9556be6a696e5db?version=3.12.1 **Expected behavior** ``...
null
2019-11-09 21:20: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['js hydrated-void-element']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
3
1
4
false
false
["src/compiler/compile/render_dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:constructor", "src/compiler/compile/render_dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper", "src/compiler/compile/render_dom/wrappers/Element/index.ts->program->function_de...
sveltejs/svelte
3,886
sveltejs__svelte-3886
['3382']
47cac13b7d5dd68c494d69921397bcaf9820e441
diff --git a/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts b/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts --- a/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts +++ b/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts @@ -300,7 +300,9 @@ export de...
diff --git a/test/runtime/samples/component-binding-reactive-statement/Button.svelte b/test/runtime/samples/component-binding-reactive-statement/Button.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-binding-reactive-statement/Button.svelte @@ -0,0 +1,11 @@ +<script> + export let count + ...
Prop binding goes out of sync when reactively updated **Describe the bug** If a bound prop is immediately updated as the result of state propagating upward, that update does not propagate downward. **To Reproduce** [REPL](https://svelte.dev/repl/74f3946d44ac43038afb24069bf64af5?version=3.6.1) Clicking the `Refact...
null
2019-11-10 07:58: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime component-binding-reactive-statement (with hydration)', 'runtime component-binding-reactive-statement ']
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/compiler/compile/render_dom/wrappers/InlineComponent/index.ts->program->class_declaration:InlineComponentWrapper->method_definition:render"]
sveltejs/svelte
3,915
sveltejs__svelte-3915
['3914']
c29e2085a192dd22f7a7122b143ca2ce09372c24
diff --git a/src/compiler/compile/render_dom/index.ts b/src/compiler/compile/render_dom/index.ts --- a/src/compiler/compile/render_dom/index.ts +++ b/src/compiler/compile/render_dom/index.ts @@ -247,7 +247,7 @@ export default function dom( function create_fragment(#ctx) { ${block.get_contents()} } - `); ...
diff --git a/test/js/samples/debug-empty/expected.js b/test/js/samples/debug-empty/expected.js --- a/test/js/samples/debug-empty/expected.js +++ b/test/js/samples/debug-empty/expected.js @@ -72,7 +72,7 @@ function instance($$self, $$props, $$invalidate) { const writable_props = ["name"]; Object.keys($$props).forE...
Development mode warnings use array.prototype.includes which breaks bundle on IE 11 **Describe the bug** When bundling in development mode the check for unknown props utilizes the Array.prototype.includes method which isn't supported on ie 11. This causes a break on ie11 **Logs** ![image](https://user-images.githu...
[caniuse says](https://caniuse.com/#feat=mdn-javascript_builtins_string_startswith) that IE doesn't support `startsWith` either, so we should replace that with something else as well.
2019-11-13 01:04: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['js debug-empty', 'js debug-foo', 'js debug-foo-bar-baz-things', 'js dev-warning-missing-data-computed']
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/compiler/compile/render_dom/index.ts->program->function_declaration:dom"]
sveltejs/svelte
3,949
sveltejs__svelte-3949
['3948']
39bbac4393d2845989601e216a5d0b4579e1983f
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## Unreleased + +* Add `aria-hidden="true"` to objects generated when adding resize-listeners, to improve accessibility ([#3948](https://github.com/sveltejs/svelte/issues/3948)) + ## 3.14.1 * Deconf...
diff --git a/test/runtime/samples/binding-width-height-a11y/_config.js b/test/runtime/samples/binding-width-height-a11y/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/binding-width-height-a11y/_config.js @@ -0,0 +1,8 @@ +export default { + async test({ assert, target }) { + const object = tar...
bind:offsetWidth causes accessibility failure **Describe the bug** When using `bind:offsetWidth` on an element, an <object> element is added to the dom, but does not include any accessibility information. **To Reproduce** Add `bind:offsetWidth` to any element **Expected behavior** The element should be rendere...
Good catch. Would `aria-hidden=true` be better here? That would remove it completely from the accessibility API while `role=none` will expose it but remove any semantic meaning. Ahh yeah. I agree. That seems like the better solution. Thanks!
2019-11-18 14:51:31+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime binding-width-height-a11y (with hydration)', 'runtime binding-width-height-a11y ']
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/runtime/internal/dom.ts->program->function_declaration:add_resize_listener"]
sveltejs/svelte
4,025
sveltejs__svelte-4025
['4022']
13ef75be22d6850677a90310d058bed6b09b5a0f
diff --git a/src/compiler/compile/render_dom/wrappers/AwaitBlock.ts b/src/compiler/compile/render_dom/wrappers/AwaitBlock.ts --- a/src/compiler/compile/render_dom/wrappers/AwaitBlock.ts +++ b/src/compiler/compile/render_dom/wrappers/AwaitBlock.ts @@ -206,7 +206,7 @@ export default class AwaitBlockWrapper extends Wrappe...
diff --git a/test/runtime/samples/await-then-no-context/main.svelte b/test/runtime/samples/await-then-no-context/main.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/await-then-no-context/main.svelte @@ -0,0 +1,12 @@ +<script> + const promise = new Promise(() => {}); + const test = [1, 2, 3]; +</sc...
{:then} without name for resolving value will not compile in certain circumstances **Describe the bug** In `{await}` ... `{:then}` blocks, not specifying a name for the resolving value will cause an error which is hard to trace back to the issue. It only happens when the block contains another block(?). This did not ...
null
2019-11-30 20:19: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime await-then-no-context ', 'runtime await-then-no-context (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/AwaitBlock.ts->program->class_declaration:AwaitBlockWrapper->method_definition:render"]
sveltejs/svelte
4,027
sveltejs__svelte-4027
['4021']
13ef75be22d6850677a90310d058bed6b09b5a0f
diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -465,7 +465,7 @@ export default class Component { extract_names(declarator.id).forEach(name => { const variable = this.var_lookup.get(name)...
diff --git a/test/validator/samples/unreferenced-variables/input.svelte b/test/validator/samples/unreferenced-variables/input.svelte --- a/test/validator/samples/unreferenced-variables/input.svelte +++ b/test/validator/samples/unreferenced-variables/input.svelte @@ -18,4 +18,8 @@ function foo() { return m + n +...
warning thrown in 3.16.0 when using export for store **Describe the bug** An incorrect(?) warning is thrown when exporting a variable that is exclusively used in a "$dereferenced" manner. This warning was not given in 3.15.0. **To Reproduce** ``` <script> export let store </script> <div class="{$store?'a':'...
null
2019-12-01 00:57: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['validate unreferenced-variables']
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/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:extract_exports"]
sveltejs/svelte
4,069
sveltejs__svelte-4069
['4018']
6a4956b4031fc5ec2bb31a9a4e41c0950fcbe814
diff --git a/src/compiler/compile/render_dom/index.ts b/src/compiler/compile/render_dom/index.ts --- a/src/compiler/compile/render_dom/index.ts +++ b/src/compiler/compile/render_dom/index.ts @@ -3,7 +3,7 @@ import Component from '../Component'; import Renderer from './Renderer'; import { CompileOptions } from '../../...
diff --git a/test/js/samples/instrumentation-script-main-block/expected.js b/test/js/samples/instrumentation-script-main-block/expected.js new file mode 100644 --- /dev/null +++ b/test/js/samples/instrumentation-script-main-block/expected.js @@ -0,0 +1,75 @@ +/* generated by Svelte vX.Y.Z */ +import { + SvelteComponent...
Unnecessary `$$invalidate` calls during component creation There's no need to instrument assignments with calls to `$$invalidate` inside the main `instance()` function body as all variables are initially set to dirty already. It wouldn't be a huge improvement, but it's unnecessary work nonetheless.
A straight ahead tweak on the current ast walk comes upon two complications: labelled statements and store reassignments. They need to be instrumented regardless of being in the main control flow or not. PR incoming
2019-12-08 19:11: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['js instrumentation-script-main-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
Refactoring
false
true
false
false
5
0
5
false
false
["src/compiler/compile/render_dom/index.ts->program->function_declaration:dom", "src/compiler/compile/render_dom/index.ts->program->function_declaration:dom->method_definition:enter", "src/compiler/compile/render_dom/index.ts->program->function_declaration:dom->method_definition:leave", "src/compiler/compile/render_dom...
sveltejs/svelte
4,071
sveltejs__svelte-4071
['4070', '4070']
6a4956b4031fc5ec2bb31a9a4e41c0950fcbe814
diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -1289,7 +1289,7 @@ export default class Component { if (this.var_lookup.has(name) && !this.var_lookup.get(name).global) return; if (template_scope...
diff --git a/test/validator/samples/missing-component-global/input.svelte b/test/validator/samples/missing-component-global/input.svelte new file mode 100644 --- /dev/null +++ b/test/validator/samples/missing-component-global/input.svelte @@ -0,0 +1,3 @@ +<div> + <String/> +</div> \ No newline at end of file diff --git...
Component Not Defined not working for buildin javascript objects **Describe the bug** ``` <String /> ``` Compiles and results in a runtime error of `string.$$ is undefined`: [REPL](https://svelte.dev/repl/1ad764d626f54d60b4b03cef168d6b85). `Math`, `Map`, `Set`, `RexExp`, etc. (resulting in other errors) Inste...
`String` is one of the known globals that we don't warn about not being declared, so I guess this is a proposal to not consider those when encountering names used for components. I'm not sure how much trouble that'd be. We currently don't really distinguish between different ways that variables are used. `String` is on...
2019-12-08 22:47:37+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['validate missing-component-global']
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/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:warn_if_undefined"]
sveltejs/svelte
4,085
sveltejs__svelte-4085
['4077']
ba3ab672338f68c580d53e3fabbee51a792ff2c8
diff --git a/src/compiler/compile/render_dom/Renderer.ts b/src/compiler/compile/render_dom/Renderer.ts --- a/src/compiler/compile/render_dom/Renderer.ts +++ b/src/compiler/compile/render_dom/Renderer.ts @@ -86,8 +86,6 @@ export default class Renderer { null ); - this.context_overflow = this.context.length > 3...
diff --git a/test/runtime/samples/bitmask-overflow-3/_config.js b/test/runtime/samples/bitmask-overflow-3/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/bitmask-overflow-3/_config.js @@ -0,0 +1,3 @@ +export default { + error: `A is not defined`, +}; \ No newline at end of file diff --git a/tes...
Application won't compile - "cannot read property 'n' of undefined" since 3.16.1 **Describe the bug** Upgrading an existing app to Svelte 3.16.1 causes client compilation to fail with the error `Cannot read property 'n' of undefined`. I'm the second person to see this in the discord, it seems. I don't know where ...
Presumably #4063 was an incomplete fix. Please do update with a repro if you find one. This script should try to compile all components in the project and allow the full stack trace and breakpoints using the built-in Node debugger. Not sure if it needs tweaking for sapper though. ``` const svelte = require('svel...
2019-12-10 15:50: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime bitmask-overflow-3 (with hydration)', 'runtime bitmask-overflow-3 ']
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/compiler/compile/render_dom/Renderer.ts->program->class_declaration:Renderer->method_definition:constructor"]
sveltejs/svelte
4,089
sveltejs__svelte-4089
['4081']
0a6310f7a39b76bb884251cf3cc385c9298645db
diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -203,7 +203,10 @@ export default class Component { const subscribable_name = name.slice(1); const variable = this.var_lookup.get(subscribable_na...
diff --git a/test/js/samples/component-store-access-invalidate/expected.js b/test/js/samples/component-store-access-invalidate/expected.js --- a/test/js/samples/component-store-access-invalidate/expected.js +++ b/test/js/samples/component-store-access-invalidate/expected.js @@ -43,7 +43,7 @@ function instance($$self, $...
Autosubscribed stores no longer listed as referenced in `vars` **Describe the bug** Since #3945, autosubscribing to a store within the template no longer causes the store to be marked as `referenced: true` in the `vars` response from the compiler. **Logs** n/a **To Reproduce** ```svelte <script> let store; ...
null
2019-12-10 20:52:35+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['vars store-referenced, generate: dom', 'vars store-referenced, generate: ssr', 'vars store-referenced, generate: false', 'js component-store-access-invalidate']
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/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:add_reference"]
sveltejs/svelte
4,091
sveltejs__svelte-4091
['4061']
0a6310f7a39b76bb884251cf3cc385c9298645db
diff --git a/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts b/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts --- a/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts +++ b/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts @@ -182,11 +182,9 @@ export d...
diff --git a/test/runtime/samples/component-slot-let-in-slot/Inner.svelte b/test/runtime/samples/component-slot-let-in-slot/Inner.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-let-in-slot/Inner.svelte @@ -0,0 +1 @@ +<slot/> diff --git a/test/runtime/samples/component-slot-let-in-sl...
Slot with props doesn't propergate changes **Describe the bug** If a slot that passes a value back contains another slot then any changes to the value will not propagate through. **To Reproduce** [Here's a repl](https://svelte.dev/repl/14a72260fda84ddcab25aea7c3f4c993?version=3.16.0). *Outer.svelte* renders a slot...
null
2019-12-10 22:59:05+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime component-slot-let-in-slot ', 'runtime component-slot-let-in-slot (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts->program->class_declaration:InlineComponentWrapper->method_definition:render"]
sveltejs/svelte
4,105
sveltejs__svelte-4105
['4087']
109639c57c51c9b73d5e618bbaf1b1c1b7698e17
diff --git a/src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts b/src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts --- a/src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts @@ -30,7 +30,7 @@ export default ...
diff --git a/test/js/samples/event-handler-dynamic/expected.js b/test/js/samples/event-handler-dynamic/expected.js --- a/test/js/samples/event-handler-dynamic/expected.js +++ b/test/js/samples/event-handler-dynamic/expected.js @@ -6,6 +6,7 @@ import { element, init, insert, + is_function, listen, noop, run_...
CI: event-handler-dynamic fails with exceptions **Describe the bug** CI logs show `event-handler-dynamic` failing to run with exceptions thrown after triggering button click events. **Logs** ``` 2019-12-10T16:53:34.3087021Z Error: Uncaught [TypeError: Cannot read property 'apply' of undefined] 2019-12-10T16:53:3...
@tanhauhau, mind taking a look at this? I see you were the last committer to this file. The offending file is here: [event-handler-dynamic](https://github.com/sveltejs/svelte/blob/master/test/runtime/samples/event-handler-dynamic/_config.js) It's passing for me locally on the latest master, and it's passing in gi...
2019-12-13 15:08:14+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime event-handler-dynamic-invalid (with hydration)', 'runtime event-handler-dynamic (with hydration)', 'runtime event-handler-dynamic ', 'runtime event-handler-dynamic-invalid ', 'runtime event-handler-dynamic-hash ', 'js event-handler-dynamic', 'runtime event-handler-dynamic-hash (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts->program->class_declaration:EventHandlerWrapper->method_definition:get_snippet"]
sveltejs/svelte
4,107
sveltejs__svelte-4107
['3998']
109639c57c51c9b73d5e618bbaf1b1c1b7698e17
diff --git a/src/compiler/compile/render_dom/wrappers/Text.ts b/src/compiler/compile/render_dom/wrappers/Text.ts --- a/src/compiler/compile/render_dom/wrappers/Text.ts +++ b/src/compiler/compile/render_dom/wrappers/Text.ts @@ -27,6 +27,11 @@ function should_skip(node: Text) { if (parent_element.type === 'Head') retur...
diff --git a/test/runtime/samples/svg-tspan-preserve-space/_config.js b/test/runtime/samples/svg-tspan-preserve-space/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/svg-tspan-preserve-space/_config.js @@ -0,0 +1,3 @@ +export default { + html: `<svg><text x=0 y=50><tspan>foo</tspan> bar<tspan>f...
Whitespace is removed around <tspan> elements **Describe the bug** The whitespace between `foo` and `bar` is removed: ```svelte <svg> <text> <tspan>foo</tspan> {"bar"} </text> </svg> ``` **To Reproduce** https://svelte.dev/repl/c80264cf1a924890bf1e23374337b141?version=3.15.0 **Expected behavior...
I have a fix for this... PR on its way :)
2019-12-13 19:28: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime svg-tspan-preserve-space (with hydration)', 'runtime svg-tspan-preserve-space ']
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/compiler/compile/render_dom/wrappers/Text.ts->program->function_declaration:should_skip"]
sveltejs/svelte
4,146
sveltejs__svelte-4146
['1277']
fb6d570b921d0de764b20913020f81b1c16aa7f4
diff --git a/src/compiler/compile/css/Selector.ts b/src/compiler/compile/css/Selector.ts --- a/src/compiler/compile/css/Selector.ts +++ b/src/compiler/compile/css/Selector.ts @@ -63,9 +63,13 @@ export default class Selector { }); } - transform(code: MagicString, attr: string) { + transform(code: MagicString, att...
diff --git a/test/css/samples/preserve-specificity/expected.css b/test/css/samples/preserve-specificity/expected.css new file mode 100644 --- /dev/null +++ b/test/css/samples/preserve-specificity/expected.css @@ -0,0 +1 @@ +a.svelte-xyz b c span.svelte-xyz{color:red;font-size:2em;font-family:'Comic Sans MS'}.foo.svelte...
Encapsulated CSS specificity bug This is possibly a bit of an edge case, and it's something that can easily be worked around, but it's a bug nonetheless: https://gist.github.com/giuseppeg/d37644d8d9d5004b15c5c48e66f632aa ```html <div> <div> <div> <span> Big red Comic Sans </span> ...
Hey is this the same problem? https://svelte.technology/repl?version=2.15.2&gist=e2a175d700754f4464c6e853585f1101
2019-12-23 03:28: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['css preserve-specificity']
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
8
3
11
false
false
["src/compiler/compile/css/Stylesheet.ts->program->class_declaration:Rule->method_definition:transform", "src/compiler/compile/css/Selector.ts->program->class_declaration:Selector->method_definition:get_amount_class_specificity_increased", "src/compiler/compile/css/Stylesheet.ts->program->class_declaration:Rule->method...
sveltejs/svelte
4,148
sveltejs__svelte-4148
['2446']
fb6d570b921d0de764b20913020f81b1c16aa7f4
diff --git a/src/compiler/compile/render_dom/wrappers/Element/index.ts b/src/compiler/compile/render_dom/wrappers/Element/index.ts --- a/src/compiler/compile/render_dom/wrappers/Element/index.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/index.ts @@ -377,8 +377,7 @@ export default class ElementWrapper exten...
diff --git a/test/js/samples/media-bindings/expected.js b/test/js/samples/media-bindings/expected.js --- a/test/js/samples/media-bindings/expected.js +++ b/test/js/samples/media-bindings/expected.js @@ -29,26 +29,26 @@ function create_fragment(ctx) { audio_updating = true; } - /*audio_timeupdate_handler*/ ctx...
Apply directives in order Currently, `on:input` event handlers are applied before any event handlers from actions or bindings, regardless of the order in which they're declared. This makes certain tasks (such as input masking) overly difficult. Demos (which behave differently between Chrome and Firefox): * https:...
null
2019-12-23 14:31:44+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime apply-directives-in-order (with hydration)', 'runtime apply-directives-in-order ', 'js media-bindings', 'js video-bindings']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Feature
false
false
false
true
5
1
6
false
false
["src/compiler/compile/render_dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:add_directives_in_order->function_declaration:getOrder", "src/compiler/compile/render_dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:add_this_binding", "...
sveltejs/svelte
4,179
sveltejs__svelte-4179
['3449']
b6081482382b436b827182afcb84e17043139078
diff --git a/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts b/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts --- a/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts @@ -76,6 +76,8 @@ export default class Attrib...
diff --git a/test/js/samples/input-value/expected.js b/test/js/samples/input-value/expected.js new file mode 100644 --- /dev/null +++ b/test/js/samples/input-value/expected.js @@ -0,0 +1,77 @@ +/* generated by Svelte vX.Y.Z */ +import { + SvelteComponent, + append, + detach, + element, + init, + insert, + listen, + noo...
Cursor misbehaviour in Safari's <input> controls **Describe the bug** In Safari (12.1.2), when adding an `<input>` control with manual two-way binding - by using an 'on:input' handler for instance - changing the contents of the `<input>` control at any point other than the end of the word causes the cursor to jump to...
I've been looking into this for about an hour. No results so far, but there seemed to be a similar problem in Elm for a while: https://github.com/elm/html/issues/174
2019-12-28 10:01:30+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['js input-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
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/Element/Attribute.ts->program->class_declaration:AttributeWrapper->method_definition:render"]
sveltejs/svelte
4,213
sveltejs__svelte-4213
['4212']
8d49aa61255dfcf0182209f5c51ebabd911f901a
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Prevent text input cursor jumping in Safari with one-way binding ([#3449](https://github.com/sveltejs/svelte/issues/3449)) * Expose compiler version in dev events ([#4047](https://github.com/sveltejs/svelte/issues/4047)...
diff --git a/test/runtime/samples/reactive-values-no-implicit-member-expression/_config.js b/test/runtime/samples/reactive-values-no-implicit-member-expression/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/reactive-values-no-implicit-member-expression/_config.js @@ -0,0 +1,5 @@ +export defaul...
Assigning to a member expression in a reactive statement shouldn't auto-declare the variable **Describe the bug** A reactive assignment that looks like `$: document.title = whatever;` doesn't work, because the compiler (unhelpfully, in this case) auto-declares `document` for us, and - since that is now undefined - the...
null
2020-01-05 03:53: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime reactive-values-no-implicit-member-expression ', 'ssr reactive-values-no-implicit-member-expression', 'runtime reactive-values-no-implicit-member-expression (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:walk_instance_js_pre_template"]
sveltejs/svelte
4,217
sveltejs__svelte-4217
['4170']
741444d07e1e9bb51a1ca0b80daf6177876a9a6e
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Prevent text input cursor jumping in Safari with one-way binding ([#3449](https://github.com/sveltejs/svelte/issues/3449)) * Expose compiler version in dev events ([#4047](https://github.com/sveltejs/svelte/issues/4047)...
diff --git a/test/runtime/samples/reactive-values-store-destructured-undefined/_config.js b/test/runtime/samples/reactive-values-store-destructured-undefined/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/reactive-values-store-destructured-undefined/_config.js @@ -0,0 +1,6 @@ +export default {...
Destructuring a store object retuns the whole store if the property does not exist **Describe the bug** When destructuring a store, the whole store object is returned if the property does not exist: `$: ({shouldBeUndefined} = $store);` It works if used with an existing property, i.e.: `$: ({existingProperty, ...
Interesting. The problem is that [here](https://github.com/sveltejs/svelte/blob/cd21acfb3cae574b81f2f417331993374222a9de/src/runtime/internal/Component.ts#L130) where we're defining the `$$invalidate` function as `(i, ret, value = ret) => { ... }`, the third argument will default to being the same as the second argumen...
2020-01-06 13:15: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime reactive-values-store-destructured-undefined (with hydration)', 'runtime reactive-values-store-destructured-undefined ']
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/runtime/internal/Component.ts->program->function_declaration:init"]
sveltejs/svelte
4,247
sveltejs__svelte-4247
['4240']
3d9655a2a186d18c366149d218cf67c75b722433
diff --git a/src/runtime/internal/ssr.ts b/src/runtime/internal/ssr.ts --- a/src/runtime/internal/ssr.ts +++ b/src/runtime/internal/ssr.ts @@ -25,9 +25,7 @@ export function spread(args, classes_to_add) { else if (boolean_attributes.has(name.toLowerCase())) { if (value) str += " " + name; } else if (value != n...
diff --git a/test/server-side-rendering/samples/spread-attributes-white-space/_expected.html b/test/server-side-rendering/samples/spread-attributes-white-space/_expected.html new file mode 100644 --- /dev/null +++ b/test/server-side-rendering/samples/spread-attributes-white-space/_expected.html @@ -0,0 +1,8 @@ +<input ...
White space escape characters are written into HTML when spread is used with SSR **Describe the bug** When new lines and tabs are used in attributes, then run through SSR, they end up written into the HTML, eg. `<div class="\none\ntwo\n"></div>`. This breaks the class name and can cause a FOUC with Sapper, and would c...
I think I'll try fixing it tomorrow on my Twitch stream, at least by adding some failing test cases if not actually fixing it.
2020-01-10 17:37: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['ssr spread-attributes-white-space']
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/runtime/internal/ssr.ts->program->function_declaration:spread"]
sveltejs/svelte
4,260
sveltejs__svelte-4260
['4258']
c97e8f81db1f77a623716c9bedaa382def1d653c
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## Unreleased + +* Only attach SSR mode markers to a component's `<head>` elements when compiling with `hydratable: true` ([#4258](https://github.com/sveltejs/svelte/issues/4258)) + ## 3.17.0 * Remo...
diff --git a/test/helpers.js b/test/helpers.js --- a/test/helpers.js +++ b/test/helpers.js @@ -45,6 +45,12 @@ export function tryToReadFile(file) { } } +export function cleanRequireCache() { + Object.keys(require.cache) + .filter(x => x.endsWith('.svelte')) + .forEach(file => delete require.cache[file]); +} + c...
Provide way to opt out of attributes on SSR'd `<head>` elements used for hydration **Is your feature request related to a problem? Please describe.** #4082 was a good solution for fixing `<head>` hydration, but unfortunately it adds unneeded attributes if one is using Svelte solely as a static site templating engine. ...
Only add attribute when `ssr:true` and `hydratable:true` sounds great. Anyway before #4082 hydration in head tags doesn't work anyway. Let's make this as a necessary upgrade step, to make hydrating head tags work 🙈
2020-01-14 03:05: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['ssr head-multiple-title', 'ssr head-title']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Feature
true
false
false
false
0
0
0
false
false
[]
sveltejs/svelte
4,279
sveltejs__svelte-4279
['4278']
bda254e250e737a1dd7acf6c732d656ce52034a1
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Disallow two-way binding to a variable declared by an `{#await}` block ([#4012](https://github.com/sveltejs/svelte/issues/4012)) * Allow access to `let:` variables in sibling attributes on slot root ([#4173](https://githu...
diff --git a/test/runtime/samples/event-handler-modifier-body-once/_config.js b/test/runtime/samples/event-handler-modifier-body-once/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/event-handler-modifier-body-once/_config.js @@ -0,0 +1,11 @@ +export default { + async test({ assert, component, ...
capture, passive modes not working for svelte:body special element. **Describe the bug** once, capture, passive options are not working for the svelte:body element. **Observation** `<svelte:window on:keydown|passive={handleKeydown}>` generates `listen(window, "keydown", /*handleKeydown*/ ctx[2], { passive: ...
null
2020-01-17 12:12:47+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime event-handler-modifier-body-once ', 'runtime event-handler-modifier-body-once (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
5
1
6
false
false
["src/compiler/compile/render_dom/wrappers/shared/add_event_handlers.ts->program->function_declaration:add_event_handler", "src/compiler/compile/render_dom/wrappers/shared/add_event_handlers.ts->program->function_declaration:add_event_handlers", "src/compiler/compile/render_dom/wrappers/Body.ts->program->class_declarat...
sveltejs/svelte
4,286
sveltejs__svelte-4286
['4242']
2f81365e44f585c28295cb3937910eef00a35b0e
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Disallow two-way binding to a variable declared by an `{#await}` block ([#4012](https://github.com/sveltejs/svelte/issues/4012)) * Allow access to `let:` variables in sibling attributes on slot root ([#4173](https://git...
diff --git a/test/css/samples/attribute-selector-word-arbitrary-whitespace/expected.css b/test/css/samples/attribute-selector-word-arbitrary-whitespace/expected.css new file mode 100644 --- /dev/null +++ b/test/css/samples/attribute-selector-word-arbitrary-whitespace/expected.css @@ -0,0 +1 @@ +.foo.svelte-xyz{color:re...
Multiline class attribute value breaks svelte **Describe the bug** At my team we spread classes into multiple lines when there are more than two classes to make it more readable. This breaks svelte. ```html <div class=" foo " > </div> <style> .foo { background: red; } </style> ``` *...
This look real similar to https://github.com/sveltejs/svelte/issues/4240 This was broken by me in #3552. Fix coming shortly.
2020-01-19 18:02: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['css attribute-selector-word-arbitrary-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
3
0
3
false
false
["src/compiler/compile/css/Selector.ts->program->function_declaration:test_attribute", "src/compiler/compile/css/Selector.ts->program->function_declaration:attribute_matches", "src/compiler/compile/css/Selector.ts->program->function_declaration:apply_selector"]
sveltejs/svelte
4,288
sveltejs__svelte-4288
['1733']
e4460e38ba58d5209514f0fa93dc61b6bb1ebb54
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Fix removing attributes during hydration ([#1733](https://github.com/sveltejs/svelte/issues/1733)) * Disallow two-way binding to a variable declared by an `{#await}` block ([#4012](https://github.com/sv...
diff --git a/test/hydration/samples/element-attribute-removed/_before.html b/test/hydration/samples/element-attribute-removed/_before.html --- a/test/hydration/samples/element-attribute-removed/_before.html +++ b/test/hydration/samples/element-attribute-removed/_before.html @@ -1 +1 @@ -<div class='foo'></div> \ No new...
Hydrating element removes every other attribute I'm new to Svelte so it's entirely possible i'm missing something basic. I'm seeing some weird behavior around the hydration feature. Attributes on the element being hydrated are removed and I'm not sure why. For example, given this markup: ```html <span id="rehydr...
Thought I would have a good chunk of open source time to look into this today. So far I've only had time to add a failing test. Maybe helpful to someone? https://github.com/sveltejs/svelte/compare/master...sammynave:multiple-attr-hydration?expand=1 I do believe the hydration feature is meant to be used with SSR, not a...
2020-01-20 15:37: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['hydration element-attribute-removed']
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/runtime/internal/dom.ts->program->function_declaration:claim_element"]
sveltejs/svelte
4,300
sveltejs__svelte-4300
['4298']
e4daaccd06cfe8fe1f4885fcb10942132153b521
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased * Fix updating a `<slot>` inside an `{#if}` or other block ([#4292](https://github.com/sveltejs/svelte/issues/4292)) +* Fix using RxJS observables in `derived` stores ([#4298](https://github.com/sveltejs/sve...
diff --git a/test/store/index.js b/test/store/index.js --- a/test/store/index.js +++ b/test/store/index.js @@ -116,6 +116,15 @@ describe('store', () => { }); }); + const fake_observable = { + subscribe(fn) { + fn(42); + return { + unsubscribe: () => {} + }; + } + }; + describe('derived', () => { ...
svelte/store `derived` doesn't handle RxJS observables **Describe the bug** The `derived` implementation doesn't handle RxJS Observables like other autosubscription stuff does. **Logs** ``` TypeError: "fn is not a function" ``` **To Reproduce** ```svelte <script> import { of } from 'rxjs'; import { deri...
null
2020-01-21 18:15:12+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['store derived works with RxJS-style observables']
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/runtime/store/index.ts->program->function_declaration:derived", "src/runtime/internal/utils.ts->program->function_declaration:subscribe"]
sveltejs/svelte
4,303
sveltejs__svelte-4303
['4301']
5107ad38b6ce0e388cb2eb99361c5000c4b6de91
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Fix updating a `<slot>` inside an `{#if}` or other block ([#4292](https://github.com/sveltejs/svelte/issues/4292)) * Fix using RxJS observables in `derived` stores ([#4298](https://github.com/sveltejs/svelte/issues/4298...
diff --git a/test/runtime/samples/keyed-each-dev-unique/_config.js b/test/runtime/samples/keyed-each-dev-unique/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/keyed-each-dev-unique/_config.js @@ -0,0 +1,7 @@ +export default { + compileOptions: { + dev: true + }, + + error: `Cannot have duplic...
Throw dev mode exception when a keyed each has duplicate keys **Is your feature request related to a problem? Please describe.** Duplicate keys in a keyed each can cause confusing runtime errors. **Describe the solution you'd like** A dev-mode-only check for **Describe alternatives you've considered** Making ...
We use `update_keyed_each` helper function to update a [keyed each logic blocks](https://svelte.dev/tutorial/keyed-each-blocks) in Svelte. The implementation of `update_keyed_each` can be [seen here](https://github.com/sveltejs/svelte/blob/cd21acf/src/runtime/internal/keyed_each.ts#L24). To add a dev-mode-only ch...
2020-01-22 15:56: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime keyed-each-dev-unique (with hydration)', 'runtime keyed-each-dev-unique ']
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/runtime/internal/keyed_each.ts->program->function_declaration:validate_each_keys", "src/runtime/internal/keyed_each.ts->program->function_declaration:measure", "src/compiler/compile/render_dom/wrappers/EachBlock.ts->program->class_declaration:EachBlockWrapper->method_definition:render_keyed"]
sveltejs/svelte
4,304
sveltejs__svelte-4304
['2181']
1a343b165c577429e968cea48607cccabf714b9b
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Make autosubscribing to a nullish store a no-op ([#2181](https://github.com/sveltejs/svelte/issues/2181)) * Fix updating a `<slot>` inside an `{#if}` or other block ([#4292](https://github.com/sveltejs/...
diff --git a/test/runtime/samples/store-auto-subscribe-nullish/_config.js b/test/runtime/samples/store-auto-subscribe-nullish/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/store-auto-subscribe-nullish/_config.js @@ -0,0 +1,13 @@ +import { writable } from '../../../../store'; + +export default...
"Cannot read property 'subscribe' of undefined" when store creation is delayed If you don't assign a store to a variable directly on initialisation you get the error `"Cannot read property 'subscribe' of undefined"` in `svelte@3.0.0-beta.11`. This is a bit of a contrived example, but demonstrates the problem ([REPL]...
Simpler example: ```html <script> import { writable } from 'svelte/store'; let foo; foo = writable(42); </script> {$foo} ``` I'm not sure what we want to do about this. One of the several things that changed in beta 4 was to subscribe to stores right away after they're declared. This is generally usef...
2020-01-22 19:28: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['ssr store-auto-subscribe-nullish', 'runtime store-auto-subscribe-nullish (with hydration)', 'runtime store-auto-subscribe-nullish ']
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/runtime/internal/utils.ts->program->function_declaration:validate_store", "src/runtime/internal/utils.ts->program->function_declaration:subscribe"]
sveltejs/svelte
4,311
sveltejs__svelte-4311
['4310']
e959dbcf31fb418b282404daa20c942b2c4264c1
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Fix updating a `<slot>` inside an `{#if}` or other block ([#4292](https://github.com/sveltejs/svelte/issues/4292)) * Fix using RxJS observables in `derived` stores ([#4298](https://github.com/sveltejs/svelte/issues/4298))...
diff --git a/test/hydration/samples/head-meta-hydrate-duplicate/_before_head.html b/test/hydration/samples/head-meta-hydrate-duplicate/_before_head.html --- a/test/hydration/samples/head-meta-hydrate-duplicate/_before_head.html +++ b/test/hydration/samples/head-meta-hydrate-duplicate/_before_head.html @@ -1,4 +1,4 @@ -...
Hydration removes <title> element **Describe the bug** When starting from SSR generated HTML with `hydratable: true`, hydration will remove the `<title>` element along with the other appropriate `<head>` elements, but will not add it back. **Logs** None. **To Reproduce** https://github.com/johnmuhl/svelte-hydr...
null
2020-01-23 14:56: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['ssr head-meta-hydrate-duplicate']
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
4,316
sveltejs__svelte-4316
['3218']
bf006a43e5fd2339adb6cfca1a322fdedcbf48da
diff --git a/src/runtime/internal/scheduler.ts b/src/runtime/internal/scheduler.ts --- a/src/runtime/internal/scheduler.ts +++ b/src/runtime/internal/scheduler.ts @@ -31,8 +31,8 @@ export function add_flush_callback(fn) { flush_callbacks.push(fn); } +const seen_callbacks = new Set(); export function flush() { - c...
diff --git a/test/runtime/samples/lifecycle-onmount-infinite-loop/Child.svelte b/test/runtime/samples/lifecycle-onmount-infinite-loop/Child.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/lifecycle-onmount-infinite-loop/Child.svelte @@ -0,0 +1 @@ +Child diff --git a/test/runtime/samples/lifecycle-o...
"Maximum call stack size exceeded" <!-- 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.dev/repl, pleas...
This seems to have been introduced in #3150 — when `flush` is called while it is already running, `render_callbacks` are run multiple times. We might be able to get away with something like `if (is_flushing) return`, but I'm not sure if there are cases where `render_callbacks` is modified with the expectation that t...
2020-01-24 22:27:39+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime lifecycle-onmount-infinite-loop (with hydration)', 'runtime lifecycle-onmount-infinite-loop ']
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/runtime/internal/scheduler.ts->program->function_declaration:flush"]
sveltejs/svelte
4,332
sveltejs__svelte-4332
['4314']
70d17950880e56f78c0a919b41ad2a356a9e37ff
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased * Fix code generation error with adjacent inline and block comments ([#4312](https://github.com/sveltejs/svelte/issues/4312)) +* Fix detection of unused CSS selectors that begin with a `:global()` but contai...
diff --git a/test/css/samples/global-with-unused-descendant/_config.js b/test/css/samples/global-with-unused-descendant/_config.js new file mode 100644 --- /dev/null +++ b/test/css/samples/global-with-unused-descendant/_config.js @@ -0,0 +1,24 @@ +export default { + warnings: [{ + code: 'css-unused-selector', + end: ...
:global(...) .child selector is given svelte- suffix if there is a variable class name in the html If there is an element with a `class={someVariable}` attribute in the markup, `:global(body) .className` child selectors get suffixed, and therefore don't apply to child components. For example, if you have a parent co...
I do think there's a bug here, but I don't think it's what you're saying it is. `.purple :global(.text)` is the selector that you should be using to refer to `.text` elements in any descendant of this component's `.purple` elements. This selector works with or without the `span` you mention. `:global(.purple) .te...
2020-01-27 23:02:48+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['css global-with-unused-descendant']
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/compiler/compile/css/Selector.ts->program->class_declaration:Selector->method_definition:constructor"]
sveltejs/svelte
4,343
sveltejs__svelte-4343
['4325']
9e7df1e41aef8e62cfc82c45ac4adde17737866f
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## Unreleased + +* Disallow attribute/prop names from matching two-way-bound names or `{shorthand}` attribute/prop names ([#4325](https://github.com/sveltejs/svelte/issues/4325)) + ## 3.18.1 * Fix c...
diff --git a/test/parser/samples/attribute-unique-binding-error/error.json b/test/parser/samples/attribute-unique-binding-error/error.json new file mode 100644 --- /dev/null +++ b/test/parser/samples/attribute-unique-binding-error/error.json @@ -0,0 +1,10 @@ +{ + "code": "duplicate-attribute", + "message": "Attributes ...
Infinite loop while binding an array to a child component **Describe the bug** I have two components : ***Cpn.svelte*** ``` <script> export let items = []; </script> ``` and a consumer : ``` <script> import Cpn from './Cpn'; let items = [] </script> <Cpn {items} bind:items/> ``` this...
Svelte detects when you add the same attribute twice: ```html <Component value="1" value="2" /> ``` Will correctly give you the error: **Attributes need to be unique** However ```html <Component value="1" bind:value /> ``` Does not give the same error, although I think it should considering it's somehow also...
2020-01-30 13:01:39+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['parse attribute-unique-binding-error', 'parse attribute-unique-shorthand-error']
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/compiler/parse/state/tag.ts->program->function_declaration:read_attribute", "src/compiler/parse/state/tag.ts->program->function_declaration:read_attribute->function_declaration:check_unique"]
sveltejs/svelte
4,352
sveltejs__svelte-4352
['4086']
83d461f53731d566c049a1b071c2b51ee57524b5
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Fix binding to module-level variables ([#4086](https://github.com/sveltejs/svelte/issues/4086)) * Disallow attribute/prop names from matching two-way-bound names or `{shorthand}` attribute/prop names ([...
diff --git a/test/runtime/samples/module-context-bind/_config.js b/test/runtime/samples/module-context-bind/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/module-context-bind/_config.js @@ -0,0 +1,4 @@ +export default { + skip_if_ssr: true, + html: '<div>object</div>' +}; diff --git a/test/run...
Module-level binding in svelte 3.16 Hi, after I updated svelte to the version `3.16.0`, the build command doesn't work anymore. Modules versions: * `"svelte": "3.16.0"` * `"rollup-plugin-svelte": "5.1.1",` Output: ```bash ⟩ yarn run build yarn run v1.19.1 $ rollup -c src/main.js → public/bundle.js... ...
@rootasjey What did you upgrade *from*? What's the latest version that works? Is it possible to create a REPL to demonstrate the issue? The root of the matter seems to be: ```svelte <script context='module'> let foo; </script> <div bind:this={foo}/> ``` I haven't checked whether this did the right thin...
2020-02-03 14:50: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime module-context-bind (with hydration)', 'runtime module-context-bind ']
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/compiler/compile/render_dom/Renderer.ts->program->class_declaration:Renderer->method_definition:invalidate"]
sveltejs/svelte
4,390
sveltejs__svelte-4390
['4372']
cb67a53e51b4859debefb720aceb4d3255a76967
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ * Fix binding to module-level variables ([#4086](https://github.com/sveltejs/svelte/issues/4086)) * Disallow attribute/prop names from matching two-way-bound names or `{shorthand}` attribute/prop names ([#4325](https://gith...
diff --git a/test/parser/samples/action-with-identifier/output.json b/test/parser/samples/action-with-identifier/output.json --- a/test/parser/samples/action-with-identifier/output.json +++ b/test/parser/samples/action-with-identifier/output.json @@ -20,6 +20,16 @@ "type": "Identifier", "start": 20, ...
Unable to deconstruct an object that has a reserved keyword https://svelte.dev/repl/8ec7ec1e072b405d90549a5277a9f235?version=3.18.1
That's not possible in plain JavaScript either. @pushkine `const { in: value } = { value: 12 }` is a syntax error in JS: https://jsfiddle.net/uakgp9ho/ So, it will be a syntax error in Svelte too. @TehShrike your fiddle makes no sense here it is corrected : https://jsfiddle.net/2n8efqh0/ jsfiddle does underline th...
2020-02-08 16:40:48+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['parse script-comment-trailing-multiline', 'parse each-block-keyed', 'parse binding', 'parse if-block', 'runtime each-block-destructured-object-reserved-key ', 'parse script-comment-trailing', 'parse each-block-else', 'parse spread', 'parse script', 'parse whitespace-normal', 'parse event-handler', 'parse attribute-dy...
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/compiler/parse/index.ts->program->class_declaration:Parser->method_definition:read_identifier", "src/compiler/parse/read/context.ts->program->function_declaration:read_context", "src/compiler/parse/read/expression.ts->program->function_declaration:read_expression"]
sveltejs/svelte
4,394
sveltejs__svelte-4394
['4388']
0625fc218bac769a2724454880e03b85202e37bc
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ * Permit reserved keywords as destructuring keys in `{#each}` ([#4372](https://github.com/sveltejs/svelte/issues/4372)) * Disallow reserved keywords in `{expressions}` ([#4372](https://github.com/sveltejs/svelte/issues/4372...
diff --git a/test/runtime/samples/event-handler-dynamic-2/_config.js b/test/runtime/samples/event-handler-dynamic-2/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/event-handler-dynamic-2/_config.js @@ -0,0 +1,33 @@ +export default { + html: ` + <button>toggle</button> + <p>0</p> + <button>h...
Element event directives reactivity I'm in a context similar to the one below: Some DOM element (here a `button`), which when clicked should call a callback function (`test`), which may change depending on a certain state (the variable `bool`) ```javascript let bool = false let foo = () => console.log("foo"...
#3836 and a few followup PRs added support for dynamic event handler when the compiler can see that the event handler is getting reassigned (e.g,, if the `swap()` function instead directly assigned either `foo` or `bar` to `test`, this would work), but apparently it's not taking this reactive declaration into account.
2020-02-09 13:50:18+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime event-handler-dynamic-2 ', 'runtime event-handler-dynamic-2 (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/nodes/EventHandler.ts->program->class_declaration:EventHandler->method_definition:reassigned"]
sveltejs/svelte
4,395
sveltejs__svelte-4395
['4393']
59a5d4a52c801b3c1b5b5033007ab8fad3fd9257
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ * Permit reserved keywords as destructuring keys in `{#each}` ([#4372](https://github.com/sveltejs/svelte/issues/4372)) * Disallow reserved keywords in `{expressions}` ([#4372](https://github.com/sveltejs/svelte/issues/4372...
diff --git a/test/runtime/samples/instrumentation-update-expression/_config.js b/test/runtime/samples/instrumentation-update-expression/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/instrumentation-update-expression/_config.js @@ -0,0 +1,31 @@ +export default { + html: ` + <p>0</p> + <butto...
++count.value produce undefined **Describe the bug** Seems if we try to increase some object property with increment operator before the operand Svelte produces undefined value in ctx. Interesting that this would work fine if we use increment operator as postfix or if the value is not an object. **To Reproduce** [...
null
2020-02-09 14:17: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime instrumentation-update-expression ', 'runtime instrumentation-update-expression (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/invalidate.ts->program->function_declaration:invalidate"]
sveltejs/svelte
4,398
sveltejs__svelte-4398
['3680']
c3232826d4690bcf9fea780bdb0b14a56e87c20c
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## Unreleased + +* Fix indirect bindings involving elements with spreads ([#3680](https://github.com/sveltejs/svelte/issues/3680)) + ## 3.18.2 * Fix binding to module-level variables ([#4086](https:...
diff --git a/test/runtime/samples/binding-indirect-spread/_config.js b/test/runtime/samples/binding-indirect-spread/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/binding-indirect-spread/_config.js @@ -0,0 +1,44 @@ +export default { + skip_if_ssr: true, + async test({ assert, component, target...
Radio/checkbox input with bind:group and spread props makes variable undefined **Describe the bug** When using an input (`type="radio"` or `type="checkbox"`) with `bind:group` in combination with spread properties, it sets the bound variable to undefined when clicked. **To Reproduce** https://svelte.dev/repl/eded0...
I think this may be a (slightly more convoluted) manifestation of the same issue as #3764. The presence of the spread is preventing the attributes from being set the way they normally would - which in this case includes the special `__value` property that Svelte then tries to refer to later. #3764 has been fixed, but, ...
2020-02-10 01:29:39+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime binding-indirect-spread ', 'runtime binding-indirect-spread (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
4
1
5
false
false
["src/compiler/compile/render_dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:add_spread_attributes", "src/compiler/compile/render_dom/wrappers/Element/Attribute.ts->program->class_declaration:AttributeWrapper->method_definition:is_indirectly_bound_value", "src/compiler/compi...
sveltejs/svelte
4,451
sveltejs__svelte-4451
['4450']
a972a47e14b110c50ca31993fae28e8ddf677a4b
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## Unreleased + +* Fix dev mode validation of `{#each}` blocks using strings ([#4450](https://github.com/sveltejs/svelte/issues/4450)) + ## 3.19.0 * Fix indirect bindings involving elements with spr...
diff --git a/test/runtime/samples/each-block-string/_config.js b/test/runtime/samples/each-block-string/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/each-block-string/_config.js @@ -0,0 +1,10 @@ +export default { + compileOptions: { + dev: true + }, + html: ` + <div>f</div> + <div>o</div>...
Dev mode {#each} check breaks with strings **Describe the bug** The dev mode validation check for `{#each}` blocks breaks with strings. **Logs** `cannot use 'in' operator to search for "length" in "foo"` **To Reproduce** https://svelte.dev/repl/svg-transitions?version=3.19.0 **Expected behavior** Same as h...
null
2020-02-23 21:30: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime each-block-string ', 'runtime each-block-string (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/runtime/internal/dev.ts->program->function_declaration:validate_each_argument"]
sveltejs/svelte
4,452
sveltejs__svelte-4452
['4445']
138213ca3c1ca91998461e961933d630aeb45b15
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Deconflict `value` parameter name used in contextual bindings ([#4445](https://github.com/sveltejs/svelte/issues/4445)) * Fix dev mode validation of `{#each}` blocks using strings ([#4450](https://githu...
diff --git a/test/runtime/samples/deconflict-contextual-bind/Widget.svelte b/test/runtime/samples/deconflict-contextual-bind/Widget.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/deconflict-contextual-bind/Widget.svelte @@ -0,0 +1,3 @@ +<script> + export let prop; +</script> diff --git a/test/runt...
Cannot bind an object property to a component variable in #each if property name is "value" ```javascript <script> ... const arr = [{ value: '' }] </script> {#each arr as { value }} <MyComponent bind:myVariable={value} /> {/each} ``` generates the following : ```javascript function mycomponent_myVaria...
null
2020-02-23 21:57: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime deconflict-contextual-bind ', 'runtime deconflict-contextual-bind (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts->program->class_declaration:InlineComponentWrapper->method_definition:render"]
sveltejs/svelte
4,454
sveltejs__svelte-4454
['4323']
b8bf3643d4590fee3afe5aae733e2ccc4547c110
diff --git a/src/compiler/compile/render_dom/index.ts b/src/compiler/compile/render_dom/index.ts --- a/src/compiler/compile/render_dom/index.ts +++ b/src/compiler/compile/render_dom/index.ts @@ -259,6 +259,9 @@ export default function dom( inject_state; if (has_invalidate) { args.push(x`$$props`, x`$$invalidate...
diff --git a/test/js/samples/debug-hoisted/expected.js b/test/js/samples/debug-hoisted/expected.js --- a/test/js/samples/debug-hoisted/expected.js +++ b/test/js/samples/debug-hoisted/expected.js @@ -50,6 +50,12 @@ function create_fragment(ctx) { function instance($$self, $$props, $$invalidate) { let obj = { x: 5 }; ...
Unknown prop using export let and export function Maybe a bug in this REPL: https://svelte.dev/repl/79aa242f7e6d4af684099868189d3cb4?version=3.18.0 If you click on button "toggle modal" in console you should have this warning: `"<Form> was created with unknown prop 'saveForm'"` If you remove from `Form.svelte`...
This looks like a bug, since `saveForm` is indeed declared, and `removeThis` should have no bearing on it. I'm going to mark it as such. However, if you're trying to bind a variable through three layers of components like this I'd recommend using a store, since we're probably abusing bindings a bit using the current...
2020-02-24 08:54: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['js debug-no-dependencies', 'js loop-protect', 'runtime dev-warning-unknown-props-2 (with hydration)', 'runtime dev-warning-unknown-props-2 ', 'js debug-hoisted']
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/compiler/compile/render_dom/index.ts->program->function_declaration:dom"]
sveltejs/svelte
4,475
sveltejs__svelte-4475
['4463', '4463']
b8bf3643d4590fee3afe5aae733e2ccc4547c110
diff --git a/src/compiler/compile/render_dom/index.ts b/src/compiler/compile/render_dom/index.ts --- a/src/compiler/compile/render_dom/index.ts +++ b/src/compiler/compile/render_dom/index.ts @@ -167,7 +167,7 @@ export default function dom( `; } - const capturable_vars = component.vars.filter(v => !v.internal ...
diff --git a/test/js/samples/loop-protect/expected.js b/test/js/samples/loop-protect/expected.js --- a/test/js/samples/loop-protect/expected.js +++ b/test/js/samples/loop-protect/expected.js @@ -108,7 +108,7 @@ function instance($$self, $$props, $$invalidate) { }); } - $$self.$capture_state = () => ({ node, foo,...
SyntaxError: missing formal parameter (Firefox) **Describe the bug** The svelte title is replaced by `500` and I have this error on the console: ``` SyntaxError: missing formal parameter ``` **Logs** Please include browser console and server logs around the time this bug occurred. **To Reproduce** To he...
Part of this is definitely webpack doing something peculiar, but I think what Svelte's doing that might be wrong is including the unknown global `require` in the object returned by `$capture_state`. Webpack is then apparently doing something weird with the bare `require` when it's not immediately called on anything. ...
2020-02-26 16:58:53+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['js loop-protect']
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/compiler/compile/render_dom/index.ts->program->function_declaration:dom"]
sveltejs/svelte
4,487
sveltejs__svelte-4487
['3521']
3a37de364bfbe75202d8e9fcef9e76b9ce6faaa2
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased * In `vars` array, correctly indicate whether `module` variables are `mutated` or `reassigned` ([#3215](https://github.com/sveltejs/svelte/issues/3215)) +* Fix spread props not updating in certain situations...
diff --git a/test/runtime/samples/spread-component-2/Widget.svelte b/test/runtime/samples/spread-component-2/Widget.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/spread-component-2/Widget.svelte @@ -0,0 +1,13 @@ +<script> + export let foo; + export let baz; + export let qux; + export let quux; + ...
Spread Props in Component removes Reactivity **Describe the bug** Using the spread operator in a #each loop in variable deconstruction and use the spread props feature along side other explicit props, makes the explicit props not reactive. **Logs** See REPL **To Reproduce** https://svelte.dev/repl/3c742a2e9ab1...
This also prevents the index from updating. https://svelte.dev/repl/3d1764569a2b480ca752b7a86c5f992a?version=3.12.1 **Update:** bug still exists with `3.15.0` ```svelte <!-- will not re-render when $activeItems changes --> <MyComp {...data} isActive={$activeItems.has(id)}/> ``` New repro using the latest Sv...
2020-02-29 03:27: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
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime spread-component-2 (with hydration)', 'runtime spread-component-2 ']
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/compiler/compile/render_dom/wrappers/InlineComponent/index.ts->program->class_declaration:InlineComponentWrapper->method_definition:render"]
sveltejs/svelte
4,506
sveltejs__svelte-4506
['4479']
926a2aebd8915c53cf81b0b1e4038c2b1952e297
diff --git a/src/compiler/compile/nodes/Binding.ts b/src/compiler/compile/nodes/Binding.ts --- a/src/compiler/compile/nodes/Binding.ts +++ b/src/compiler/compile/nodes/Binding.ts @@ -72,6 +72,11 @@ export default class Binding extends Node { }); variable[this.expression.node.type === 'MemberExpression' ? 'mut...
diff --git a/test/validator/samples/binding-const-field/errors.json b/test/validator/samples/binding-const-field/errors.json new file mode 100644 --- /dev/null +++ b/test/validator/samples/binding-const-field/errors.json @@ -0,0 +1 @@ +[] diff --git a/test/validator/samples/binding-const-field/input.svelte b/test/valid...
Throw a warning if we are declaring a variable with const and also using bind directive to mutate its value. **Is your feature request related to a problem? Please describe.** While defining a variable in #Svelte, make sure to use let/var and not const, otherwise those bindings won't work, as it can't be updated by i...
This sounds reasonable. I think I'd favor an outright compilation error in this case. We need to be careful though because binding to `foo.bar` when `foo` is a const should continue to be valid. Yes absolutely. Making sure that primitives cannot be mutated once assigned with const. Sounds reasonable? Some pointers for ...
2020-03-04 20:14:12+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['validate binding-const']
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/compiler/compile/nodes/Binding.ts->program->class_declaration:Binding->method_definition:constructor"]
sveltejs/svelte
4,522
sveltejs__svelte-4522
['2227', '5153']
d3f3ea38d0e5520f9c86b55c65aa0571a03b65e2
diff --git a/src/compiler/compile/render_dom/index.ts b/src/compiler/compile/render_dom/index.ts --- a/src/compiler/compile/render_dom/index.ts +++ b/src/compiler/compile/render_dom/index.ts @@ -485,7 +485,7 @@ export default function dom( ${css.code && b`this.shadowRoot.innerHTML = \`<style>${css.code.replace(...
diff --git a/test/custom-elements/index.ts b/test/custom-elements/index.ts --- a/test/custom-elements/index.ts +++ b/test/custom-elements/index.ts @@ -110,8 +110,8 @@ describe('custom-elements', function() { const page = await browser.newPage(); - page.on('console', (type, ...args) => { - console[type](......
Prop initialization in web/standalone components Today I created a small, self-contained standalone/web-component in svelte and stumbled across the following behaviour: In my component, i declare a few properties like so: ```javascript export let zip = null; export let radius = 10; ``` I then create/bundle the ...
Update on this, the problem is the execution order of sveltes onMount-handler in relation to the web components `attributeChangedCallback` and `connectedCallback`. I added some `console.log`s in the source code, to get a glimpse on the order of execution. As you can see, onMount gets called first, then the attributeCha...
2020-03-07 06:40:14+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['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
5
0
5
false
false
["src/runtime/internal/Component.ts->program->function_declaration:init", "src/runtime/internal/Component.ts->program->method_definition:connectedCallback", "src/runtime/internal/Component.ts->program->method_definition:disconnectedCallback", "src/compiler/compile/render_dom/index.ts->program->function_declaration:dom"...
sveltejs/svelte
4,558
sveltejs__svelte-4558
['4549']
ec3589e31425c54cda3c5f6a80b89eb3aaa7bd52
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Allow `<svelte:self>` to be used in a slot ([#2798](https://github.com/sveltejs/svelte/issues/2798)) * Expose object of unknown props in `$$restProps` ([#2930](https://github.com/sveltejs/svelte/issues/2930)) +* Fix upd...
diff --git a/test/runtime/samples/each-block-keyed-else/_config.js b/test/runtime/samples/each-block-keyed-else/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/each-block-keyed-else/_config.js @@ -0,0 +1,37 @@ +export default { + props: { + animals: ['alpaca', 'baboon', 'capybara'], + foo: 's...
Keyed {#each} block's {:else} statement is rendering when it shouldn't **Describe the bug** Keyed {#each} block's {:else} statement is rendering when it shouldn't (if the array was empty initially). Keyed {#each} block's {:else} statement is not rendering when it should (if the array had values initially). **To Re...
This can probably be combined with #4536. > This can probably be combined with #4536. Agreed - after noticing that one, I played with it more and found that whether it renders the :else depends entirely on whether the array was populated initially or not. It will always render if array had no value to start, and wi...
2020-03-14 13:16:12+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ...
['runtime each-block-keyed-else (with hydration)', 'runtime each-block-keyed-else ']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
3
1
4
false
false
["src/compiler/compile/render_dom/wrappers/EachBlock.ts->program->class_declaration:EachBlockWrapper->method_definition:render_unkeyed", "src/compiler/compile/render_dom/wrappers/EachBlock.ts->program->class_declaration:EachBlockWrapper", "src/compiler/compile/render_dom/wrappers/EachBlock.ts->program->class_declaratio...
sveltejs/svelte
4,564
sveltejs__svelte-4564
['4562', '4562']
40c5df51a2262186d940331b139fb049f2ae93da
diff --git a/src/compiler/compile/render_dom/wrappers/Slot.ts b/src/compiler/compile/render_dom/wrappers/Slot.ts --- a/src/compiler/compile/render_dom/wrappers/Slot.ts +++ b/src/compiler/compile/render_dom/wrappers/Slot.ts @@ -38,6 +38,7 @@ export default class SlotWrapper extends Wrapper { name: this.renderer.com...
diff --git a/test/runtime/samples/component-slot-fallback-3/Inner.svelte b/test/runtime/samples/component-slot-fallback-3/Inner.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-fallback-3/Inner.svelte @@ -0,0 +1,6 @@ +<slot> + <div>Hello</div> + <div>world</div> + <div>Bye</div> + <di...
Compiler error in 3.20.0 with certain slot usage **Describe the bug** As of 3.20.0, the compiler is now throwing an exception when compiling certain slot usages. **Logs** Compile time exception: `Variable 't' already initialised with a different value` **To Reproduce** ```svelte <slot> <div title={foo}>foo<...
I spent the day troubleshooting why my apps won't start. Any slot where the first element is a ``<!-- comment -->`` halts the build. ``<slot>foobar<!-- placeholder--></slot>`` **works** ``<slot> <!-- placeholder--></slot>`` **works** ``<slot></slot>`` **works** ``<slot/>`` **works** ``<slot><!-- placeholder--...
2020-03-16 16:02:48+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime component-slot-fallback-3 (with hydration)', 'runtime component-slot-fallback-3 ']
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/compiler/compile/render_dom/wrappers/Slot.ts->program->class_declaration:SlotWrapper->method_definition:render", "src/compiler/compile/render_dom/wrappers/Slot.ts->program->class_declaration:SlotWrapper->method_definition:constructor"]
sveltejs/svelte
4,634
sveltejs__svelte-4634
['4630']
77ec48debaf99e33197729d3c739d888aa7654d4
diff --git a/src/compiler/compile/render_dom/wrappers/IfBlock.ts b/src/compiler/compile/render_dom/wrappers/IfBlock.ts --- a/src/compiler/compile/render_dom/wrappers/IfBlock.ts +++ b/src/compiler/compile/render_dom/wrappers/IfBlock.ts @@ -520,28 +520,22 @@ export default class IfBlockWrapper extends Wrapper { if (br...
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 @@ -42,12 +42,12 @@ function create_fragment(ctx) { }, p(ctx, [dirty]) { if (/*foo*/ ctx[0]) { - if (!if...
Component nested in if_block will fail to unmount if it has an element using an outro nested in a truthy if_block This is a concise report for the bug encountered in #4620, #4064, #3685, #3410 and #3202. [Absolute minimum REPL]( https://svelte.dev/repl/1f6f0ae29a6747368a2eb25ea2741703?version=3.20.1) 1) New Compo...
null
2020-04-05 21:27: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['js if-block-simple', 'runtime transition-js-if-outro-unrelated-component-store-update ', 'js transition-local', 'runtime transition-js-if-outro-unrelated-component-binding-update (with hydration)', 'runtime transition-js-if-outro-unrelated-component-store-update (with hydration)', 'js use-elements-as-anchors', 'js tr...
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/compiler/compile/render_dom/wrappers/IfBlock.ts->program->class_declaration:IfBlockWrapper->method_definition:render_simple"]
sveltejs/svelte
4,650
sveltejs__svelte-4650
['4648']
7dcbc5173bb8ea453566aacee7ba8926941ddc75
diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts --- a/src/compiler/compile/nodes/Element.ts +++ b/src/compiler/compile/nodes/Element.ts @@ -378,6 +378,14 @@ export default class Element extends Node { } } + + if (/(^[0-9-.])|[\^$@%&#?!|()[\]{}^*+~;]/.test(name)) {...
diff --git a/test/validator/samples/attribute-invalid-name-2/errors.json b/test/validator/samples/attribute-invalid-name-2/errors.json new file mode 100644 --- /dev/null +++ b/test/validator/samples/attribute-invalid-name-2/errors.json @@ -0,0 +1,15 @@ +[{ + "code": "illegal-attribute", + "message": "'3aa' is not a val...
Stray } in element is interpreted as an attribute and causes a runtime error **Describe the bug** When Svelte sees an element with an orphaned `}` character it interprets the bracket as an attribute. e.g. `<h1 }>text</h1>` causes this to be generated in the create function: `attr(h1, "}", "");` and causes the ...
null
2020-04-08 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
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['validate attribute-invalid-name-5', 'validate attribute-invalid-name', 'validate attribute-invalid-name-3', 'validate attribute-invalid-name-2', 'validate attribute-invalid-name-4']
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/compiler/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:validate_attributes", "src/compiler/compile/nodes/Element.ts->program->function_declaration:within_custom_element"]
sveltejs/svelte
4,689
sveltejs__svelte-4689
['4631']
cc3c7fa9f4ab4ce627daf21945d3ec0c2b2c3b63
diff --git a/src/compiler/compile/render_dom/wrappers/Element/Binding.ts b/src/compiler/compile/render_dom/wrappers/Element/Binding.ts --- a/src/compiler/compile/render_dom/wrappers/Element/Binding.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/Binding.ts @@ -57,7 +57,7 @@ export default class BindingWrapper...
diff --git a/test/runtime/samples/binding-input-number-2/_config.js b/test/runtime/samples/binding-input-number-2/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/binding-input-number-2/_config.js @@ -0,0 +1,31 @@ +export default { + test({ assert, target, window, component }) { + const input =...
Renders of a variable bound to an input element of type="number" will not update if the variable is changed within a reactive statement that is triggered by the input **Describe the bug** The title is a hell of a mouthful. I'm still not certain I've actually pinpointed the odd behavior, but this is as close as I coul...
Possibly related to #2816 and #3470. The difference in behavior between `number` and `text` is presumably related to the `input_updating` guard in the code generated for `number` but I haven't dug into it any more deeply than that. ```js this.needs_lock = name === 'input' && type === 'number'; // TODO others? ``` ...
2020-04-18 19:31: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime binding-input-number-2 (with hydration)', 'runtime binding-input-number-2 ']
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/compiler/compile/render_dom/wrappers/Element/Binding.ts->program->class_declaration:BindingWrapper->method_definition:constructor", "src/compiler/compile/render_dom/wrappers/Element/Binding.ts->program->class_declaration:BindingWrapper->method_definition:render"]
sveltejs/svelte
4,705
sveltejs__svelte-4705
['4703']
1c14e6e97111117da5a56b0651cd2482e37d7043
diff --git a/src/compiler/compile/render_dom/wrappers/Slot.ts b/src/compiler/compile/render_dom/wrappers/Slot.ts --- a/src/compiler/compile/render_dom/wrappers/Slot.ts +++ b/src/compiler/compile/render_dom/wrappers/Slot.ts @@ -45,7 +45,7 @@ export default class SlotWrapper extends Wrapper { renderer, this.fallb...
diff --git a/test/runtime/samples/slot-if-block-update-no-anchor/_config.js b/test/runtime/samples/slot-if-block-update-no-anchor/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/slot-if-block-update-no-anchor/_config.js @@ -0,0 +1,7 @@ +export default { + test({ assert, target, component }) { +...
If blocks in nested slots break the app **Description** When using an if-block directly in a nested slot, it causes the app to break. **To Reproduce** - Open REPL: https://svelte.dev/repl/b78f73d066784716806a64d86a0ed58a?version=3.20.1 - Simply open the console and click the checkbox. <details> <summary>St...
null
2020-04-22 15:01:06+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime whitespace-normal (with hydration)', 'ssr class-shortcut-with-class', 'runtime attr...
['runtime store-each-binding-destructuring (with hydration)', 'runtime window-event-context ', 'runtime svg ', 'runtime transition-js-each-block-outro ', 'runtime transition-js-each-block-intro (with hydration)', 'runtime store-resubscribe-export ', 'runtime window-binding-scroll-store ', 'runtime store-auto-subscribe-...
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/compiler/compile/render_dom/wrappers/Slot.ts->program->class_declaration:SlotWrapper->method_definition:constructor"]
sveltejs/svelte
4,736
sveltejs__svelte-4736
['4730']
17c5402e311d7224aa8c11d979c9b32cb950883f
diff --git a/src/compiler/compile/render_ssr/handlers/Comment.ts b/src/compiler/compile/render_ssr/handlers/Comment.ts --- a/src/compiler/compile/render_ssr/handlers/Comment.ts +++ b/src/compiler/compile/render_ssr/handlers/Comment.ts @@ -1,10 +1,8 @@ import Renderer, { RenderOptions } from '../Renderer'; import Comm...
diff --git a/test/helpers.ts b/test/helpers.ts --- a/test/helpers.ts +++ b/test/helpers.ts @@ -4,7 +4,7 @@ import glob from 'tiny-glob/sync'; import * as path from 'path'; import * as fs from 'fs'; import * as colors from 'kleur'; -export const assert = (assert$1 as unknown) as typeof assert$1 & { htmlEqual: (actual...
preserveComments doesn't work **Describe the bug** The compiler option `preserveComments: true` does nothing. **To Reproduce** See [this repo](https://github.com/bwbroersma/preserve-comments-in-ssr/). With [minimal changes](https://github.com/bwbroersma/preserve-comments-in-ssr/commit/0e873e990e9407984fb4fdf3e0219...
null
2020-04-27 21:49: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-block-else', 'runtime transition-js-each-block-out...
['ssr comment-preserve', 'js ssr-preserve-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
true
false
false
false
0
0
0
false
false
[]
sveltejs/svelte
4,759
sveltejs__svelte-4759
['4686']
b3364424d7d454640045f352314eec63b73bf040
diff --git a/src/compiler/compile/render_dom/wrappers/shared/bind_this.ts b/src/compiler/compile/render_dom/wrappers/shared/bind_this.ts --- a/src/compiler/compile/render_dom/wrappers/shared/bind_this.ts +++ b/src/compiler/compile/render_dom/wrappers/shared/bind_this.ts @@ -55,6 +55,9 @@ export default function bind_th...
diff --git a/test/runtime/samples/binding-this-each-object-props/_config.js b/test/runtime/samples/binding-this-each-object-props/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/binding-this-each-object-props/_config.js @@ -0,0 +1,14 @@ +export default { + html: ``, + + async test({ assert, com...
Compilation fails when using two bind:this to array/object with same key Compilation fails when using two bind:this to array/object with same key Error msg: `Variable 'xxx' already initialised with a different value` Bug (version 3.20.1) https://svelte.dev/repl/5d29d37523c14015b3d79fa53d21e1dd?version=3.20.1 Bu...
I don't think it's a bug. Your variable is already binded to the DOM element corresponding to the first `Comp` component, so it can't be binded again to another DOM element. Why would you need to bind two elements to the same variable ? @Oreilles I created a new REPL showing in some context what I am trying to achiev...
2020-05-01 22:33: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime binding-this-each-object-props (with hydration)', 'runtime binding-this-each-object-spread (with hydration)', 'runtime binding-this-each-object-props ', 'runtime binding-this-each-object-spread ']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/shared/bind_this.ts->program->function_declaration:bind_this"]
sveltejs/svelte
4,766
sveltejs__svelte-4766
['4399']
a658fedb83328e88e52afc376ba22ffc45db8c56
diff --git a/src/runtime/motion/tweened.ts b/src/runtime/motion/tweened.ts --- a/src/runtime/motion/tweened.ts +++ b/src/runtime/motion/tweened.ts @@ -93,6 +93,11 @@ export function tweened<T>(value?: T, defaults: Options<T> = {}): Tweened<T> { interpolate = get_interpolator } = assign(assign({}, defaults), opts...
diff --git a/test/motion/index.js b/test/motion/index.js --- a/test/motion/index.js +++ b/test/motion/index.js @@ -19,5 +19,12 @@ describe('motion', () => { size.set(100); assert.equal(get(size), 100); }); + + it('sets immediately when duration is 0', () => { + const size = tweened(0); + + size.set(100,...
Immediate tweened store value update with { duration: 0 } option **Is your feature request related to a problem? Please describe.** In Firefox and Safari, when there's a tweened store and we call `tweenedStore.update(fn, {duration: 0})` sometimes the tweened value gets computed to `NaN`. Then I went to read about how ...
I'd prefer to early-out and immediately set the value in this case as well. I bumped into this issue while implementing touch gestures for an image gallery. I wanted to set the value immediately when handling touch events, but have the possibility to tween/spring the values when, for example, the user's gesture moved s...
2020-05-03 06:52: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['motion tweened sets immediately when duration is 0']
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/runtime/motion/tweened.ts->program->function_declaration:tweened->function_declaration:set"]
sveltejs/svelte
4,769
sveltejs__svelte-4769
['4768']
a658fedb83328e88e52afc376ba22ffc45db8c56
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Do not display a11y warning about missing `href` for `<a>` with `name` or `id` ([#4697](https://github.com/sveltejs/svelte/issues/4697)) * Disable infinite loop guard inside generators ([#4698](https://github.com/sveltejs...
diff --git a/test/runtime/samples/deconflict-anchor/Anchor.svelte b/test/runtime/samples/deconflict-anchor/Anchor.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/deconflict-anchor/Anchor.svelte @@ -0,0 +1 @@ +<p>Anchor</p> diff --git a/test/runtime/samples/deconflict-anchor/_config.js b/test/runtim...
when component name is Anchor, it'll break the app **Describe the bug** when doing `import Anchor from './Anchor.svelte` and use it, it'll break the app and showing `component is undefined`. After changing name to anything else it works. **To Reproduce** [repl](https://svelte.dev/repl/164f2abd2ca044b1b21652f30...
null
2020-05-03 13:08: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime deconflict-anchor (with hydration)', 'runtime deconflict-anchor ']
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
11
0
11
false
false
["src/compiler/compile/render_dom/Block.ts->program->class_declaration:Block->method_definition:add_element", "src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts->program->class_declaration:InlineComponentWrapper->method_definition:render", "src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts->pro...
sveltejs/svelte
4,771
sveltejs__svelte-4771
['4770']
b9f83fd295168b12d5608c9778c183fcb53abeb6
diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts --- a/src/compiler/compile/nodes/Element.ts +++ b/src/compiler/compile/nodes/Element.ts @@ -438,7 +438,7 @@ export default class Element extends Node { if (href_attribute) { const href_value = href_attribute.get_static...
diff --git a/test/validator/samples/a11y-img-redundant-alt/input.svelte b/test/validator/samples/a11y-img-redundant-alt/input.svelte --- a/test/validator/samples/a11y-img-redundant-alt/input.svelte +++ b/test/validator/samples/a11y-img-redundant-alt/input.svelte @@ -4,4 +4,5 @@ <img src="bar" alt="Image of me at a bar...
img-redundant-alt warning bug (Breaking) **Describe the bug** `alt` attributes with expressions on image elements returns `null` for static value, but new commit for `img-redundant-alt` warning checks it as a string. https://github.com/sveltejs/svelte/commit/153b128fe28a3283b684fccb051deb66152a6d46#diff-8e6b4a7e9c...
null
2020-05-03 20:09:36+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['validate a11y-img-redundant-alt']
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/compiler/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:validate_special_cases"]
sveltejs/svelte
4,772
sveltejs__svelte-4772
['1701']
1c05785ddfd21463ad359f6b0a7cfcad76258356
diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -133,7 +133,7 @@ export function get_binding_group_value(group) { } export function to_number(value) { - return value === '' ? undefined : +value; + return value === '' ? nul...
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 @@ -35,14 +35,14 @@ export default { <p>number 44</p> `); - // empty st...
For input numbers we should use null instead undefined in toNumber If you return undefined it became the problem for some situations like this (we can't set undefined back): https://svelte.technology/repl?version=2.30.1&gist=4728f0fd73979c92e7c07ec0a7eebb94 by the standard, the "number input" can contain numbers or...
I don't know what the problem was supposed to have been when this issue was opened (and I also don't know what version it was against. there is no 2.30.1), but in the latest v2 I don't see anything in the console https://v2.svelte.dev/repl?version=2.16.1&gist=4728f0fd73979c92e7c07ec0a7eebb94 @Conduitry this problem s...
2020-05-03 20:54:22+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime binding-input-number (with hydration)', 'runtime 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
1
0
1
true
false
["src/runtime/internal/dom.ts->program->function_declaration:get_binding_group_value"]
sveltejs/svelte
4,778
sveltejs__svelte-4778
['4777']
bb5e2d2f262867ad0e96f7d85f8ab9013c853a3b
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## Unreleased + +* Fix compiler exception with `a11y-img-redundant-alt` and value-less `alt` attribute ([#4777](https://github.com/sveltejs/svelte/issues/4777)) + ## 3.22.1 * Fix compiler exception ...
diff --git a/test/validator/samples/a11y-img-redundant-alt/input.svelte b/test/validator/samples/a11y-img-redundant-alt/input.svelte --- a/test/validator/samples/a11y-img-redundant-alt/input.svelte +++ b/test/validator/samples/a11y-img-redundant-alt/input.svelte @@ -6,3 +6,4 @@ <img src="bar" alt="Plant doing photosyn...
Build fails – TypeError: alt_value.match is not a function Enter `<img alt>` in a REPL. Cause: https://github.com/sveltejs/svelte/blob/master/src/compiler/compile/nodes/Element.ts#L491
null
2020-05-04 15:18: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['validate a11y-img-redundant-alt']
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/compiler/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:validate_special_cases"]
sveltejs/svelte
4,809
sveltejs__svelte-4809
['4803', '4803']
c743e72a1eaa5710ab510841e9906e27879fc539
diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -98,7 +98,9 @@ export function set_attributes(node: Element & ElementCSSInlineStyle, attributes node.removeAttribute(key); } else if (key === 'style') { node.style.css...
diff --git a/test/runtime/samples/spread-element-input-bind-group-with-value-attr/_config.js b/test/runtime/samples/spread-element-input-bind-group-with-value-attr/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/spread-element-input-bind-group-with-value-attr/_config.js @@ -0,0 +1,15 @@ +export...
Spread props + bind:group + value It's very weird behavior! When I use `spread props`, the attribute `value` is not rendering. I did a REPL: https://svelte.dev/repl/73b2780bd1744b189564ffca010c2aec?version=3.22.2 Example (fragment in REPL): ```svelte <input type="radio" id="{name}_{idx}" {value} ...
2020-05-09 06:54:44+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime spread-element-input-bind-group-with-value-attr (with hydration)', 'runtime spread-element-input-bind-group-with-value-attr ']
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/runtime/internal/dom.ts->program->function_declaration:set_attributes"]
sveltejs/svelte
4,841
sveltejs__svelte-4841
['4840']
c9020d35b7ca52b381a9afd9d50206ba42fc13bc
diff --git a/src/compiler/compile/render_dom/wrappers/IfBlock.ts b/src/compiler/compile/render_dom/wrappers/IfBlock.ts --- a/src/compiler/compile/render_dom/wrappers/IfBlock.ts +++ b/src/compiler/compile/render_dom/wrappers/IfBlock.ts @@ -392,7 +392,7 @@ export default class IfBlockWrapper extends Wrapper { ${sn...
diff --git a/test/runtime/samples/if-block-static-with-elseif-else-and-outros/RRR.svelte b/test/runtime/samples/if-block-static-with-elseif-else-and-outros/RRR.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/if-block-static-with-elseif-else-and-outros/RRR.svelte @@ -0,0 +1 @@ +rrr \ No newline at e...
If-elseif-else block not evaluating first if condition properly when using function, reactive value, and nested component **Describe the bug** (Open my REPL link below. This will be way easier to follow) When using an if,elseif,else statement where the first `if` uses a function, the second `if` uses a reactive value...
This seems loosely related to https://github.com/sveltejs/svelte/issues/4120
2020-05-15 20:54:13+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime if-block-static-with-elseif-else-and-outros (with hydration)', 'runtime if-block-static-with-elseif-else-and-outros ']
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/compiler/compile/render_dom/wrappers/IfBlock.ts->program->class_declaration:IfBlockWrapper->method_definition:render_compound_with_outros"]
sveltejs/svelte
4,860
sveltejs__svelte-4860
['4693']
24ef4e1181dc4a497f86d57d396209350825fdeb
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ * Add `a11y-no-onchange` warning ([#4788](https://github.com/sveltejs/svelte/pull/4788)) * Add `muted` binding for media elements ([#2998](https://github.com/sveltejs/svelte/issues/2998)) * Fix let-less `<slot>` with conte...
diff --git a/test/js/samples/action-custom-event-handler/expected.js b/test/js/samples/action-custom-event-handler/expected.js --- a/test/js/samples/action-custom-event-handler/expected.js +++ b/test/js/samples/action-custom-event-handler/expected.js @@ -14,6 +14,7 @@ import { function create_fragment(ctx) { let but...
use-directives are called multiple times when elements inside a keyed block are reordered **Description of the bug** - When attaching "use" directives inside a keyed block, they are called again (without being destroyed) if the elements of the block are reordered. **To Reproduce** - This REPL reproduces the issue...
This came up before in #2735, which was recently closed by its author who said it was now fixed - but perhaps it wasn't completely? I haven't looked closely at either repro or looked again at the PR that was said to resolve the other issue. Thanks. I did not see that one before (I had only searched for open issues...)....
2020-05-19 01:01:06+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['js input-value', 'js window-binding-scroll', 'js window-binding-online', 'js bind-online', 'js instrumentation-template-if-no-block', 'js input-no-initial-value', 'js dont-invalidate-this', 'runtime each-block-keyed-component-action (with hydration)', 'js input-range', 'js capture-inject-dev-only', 'js bind-open', 'j...
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/compiler/compile/render_dom/Block.ts->program->class_declaration:Block->method_definition:get_contents", "src/compiler/compile/render_dom/Block.ts->program->class_declaration:Block->method_definition:render_listeners", "src/runtime/internal/keyed_each.ts->program->function_declaration:update_keyed_each->function_...
sveltejs/svelte
4,863
sveltejs__svelte-4863
['4852']
11967804afbf748d92cfaa93f467ec83ae702ef1
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * Add `muted` binding for media elements ([#2998](https://github.com/sveltejs/svelte/issues/2998)) * Fix let-less `<slot>` with context overflow ([#4624](https://github.com/sveltejs/svelte/issues/4624)) * Fix `use:` acti...
diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -53,7 +53,7 @@ function create_each_block(ctx) { t5 = text(" ago:"); t...
{@html html-string} replacing tr,td tags If a table's tbody has an existing tr element and we place another tr before it using @html tag, the tags tr, td are stripped. **To Reproduce** Please see here: https://svelte.dev/repl/dee930a465e14a31baa1846003463e12?version=3.22.3 Thanks
It looks like this happened between 3.6.11 and 3.7.0 as a result of #3329. I'm not sure what can reasonably be done about this. The newer way of handling `{@html}` blocks involves creating a temporary `<div>` and setting its `innerHTML`, which presents a problem here, as certain types of elements are not allowed as chi...
2020-05-19 02:14:48+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime raw-mustaches-td-tr (with hydration)', 'js each-block-changed-check', 'runtime raw-mustaches-td-tr ']
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
8
1
9
false
false
["src/runtime/internal/dom.ts->program->class_declaration:HtmlTag->method_definition:m", "src/runtime/internal/dom.ts->program->class_declaration:HtmlTag->method_definition:u", "src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts->program->class_declaration:RawMustacheTagWrapper->method_definition:render", "src/...
sveltejs/svelte
4,936
sveltejs__svelte-4936
['4930']
a4dadf82be8c5b13915241d6d3999dd54e75e2d4
diff --git a/src/compiler/parse/read/style.ts b/src/compiler/parse/read/style.ts --- a/src/compiler/parse/read/style.ts +++ b/src/compiler/parse/read/style.ts @@ -54,6 +54,13 @@ export default function read_style(parser: Parser, start: number, attributes: No }, node.start); } + if (node.type === 'PseudoCla...
diff --git a/test/parser/samples/error-css-global-without-selector/error.json b/test/parser/samples/error-css-global-without-selector/error.json new file mode 100644 --- /dev/null +++ b/test/parser/samples/error-css-global-without-selector/error.json @@ -0,0 +1,10 @@ +{ + "code": "css-syntax-error", + "message": ":glob...
Compiler crashes with orphaned :global in CSS **Describe the bug** CSS like this causes the Svelte compiler to crash: ``` <style> .codemirror-container.flex :global {padding:0} </style> ``` **To Reproduce** https://svelte.dev/repl/c0b2792175ab48c0afb84b01b9bfa247?version=3.23.0 **Expected behavior** T...
null
2020-05-30 22:07:15+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['parse error-css-global-without-selector']
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/compiler/parse/read/style.ts->program->function_declaration:read_style", "src/compiler/parse/read/style.ts->program->function_declaration:is_ref_selector"]
sveltejs/svelte
4,960
sveltejs__svelte-4960
['4895']
1ca83c20506d7b4c97a921d98c21fc564f8efa16
diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -788,6 +788,42 @@ export default class Component { scope = map.get(node); } + let deep = false; + let names: string[] | undefined; + +...
diff --git a/test/js/samples/unchanged-expression/expected.js b/test/js/samples/unchanged-expression/expected.js --- a/test/js/samples/unchanged-expression/expected.js +++ b/test/js/samples/unchanged-expression/expected.js @@ -73,7 +73,7 @@ let world1 = 'world'; let world2 = 'world'; function instance($$self, $$pro...
Assignment to const variable in inline event handler is ignored **Describe the bug** When an inline event handler assigns to a const variable no error is raised and the assigment is silently ignored. **To Reproduce** - [repl](https://svelte.dev/repl/2c8e583e379f49b3af2066f08ad5c2ba?version=3.22.3) - minimal examp...
null
2020-06-02 21:42:05+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['validate assignment-to-const-2', 'validate assignment-to-const-3', 'validate assignment-to-const', 'validate assignment-to-const-4']
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/compiler/compile/nodes/shared/Expression.ts->program->class_declaration:Expression->method_definition:constructor->method_definition:enter", "src/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:post_template_walk->method_definition:enter"]
sveltejs/svelte
5,253
sveltejs__svelte-5253
['5252', '5252']
1398affa53050a4685bdf00b373197e7ba0d0965
diff --git a/src/compiler/compile/css/Stylesheet.ts b/src/compiler/compile/css/Stylesheet.ts --- a/src/compiler/compile/css/Stylesheet.ts +++ b/src/compiler/compile/css/Stylesheet.ts @@ -435,7 +435,7 @@ export default class Stylesheet { child.warn_on_unused_selector((selector: Selector) => { component.warn(sel...
diff --git a/test/css/samples/empty-class/_config.js b/test/css/samples/empty-class/_config.js --- a/test/css/samples/empty-class/_config.js +++ b/test/css/samples/empty-class/_config.js @@ -2,7 +2,7 @@ export default { warnings: [{ filename: "SvelteComponent.svelte", code: `css-unused-selector`, - message: "U...
css-unused-selector: Add to message which selector is unused **Is your feature request related to a problem? Please describe.** The css-unused-selector warning message does not contain the name of the unused selector. Adding this would help in scenarios like `svelte-check` where people do not see the code but only get...
2020-08-09 02:50:29+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['css unused-selector-string-concat', 'css unused-selector-ternary-nested', 'css unused-selector-ternary', 'css unused-selector', 'css omit-scoping-attribute-descendant', 'css global-with-unused-descendant', 'css empty-class', 'css unused-selector-leading', 'css unused-selector-ternary-concat']
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/compiler/compile/css/Stylesheet.ts->program->class_declaration:Stylesheet->method_definition:warn_on_unused_selectors"]
sveltejs/svelte
5,323
sveltejs__svelte-5323
['5528']
60024effa8acd102e326a020dd8354f0b39d05a8
diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts --- a/src/compiler/compile/nodes/Element.ts +++ b/src/compiler/compile/nodes/Element.ts @@ -616,8 +616,24 @@ export default class Element extends Node { } if (this.name === 'label') { - const has_input_child = this.chil...
diff --git a/test/validator/samples/a11y-label-has-associated-control-2/input.svelte b/test/validator/samples/a11y-label-has-associated-control-2/input.svelte new file mode 100644 --- /dev/null +++ b/test/validator/samples/a11y-label-has-associated-control-2/input.svelte @@ -0,0 +1,3 @@ +<label> + <slot /> +</label> d...
A11y: A form label must be associated with a control. (When label actually has control element) Case when labelable element is not direct child of label element triggers current warning https://svelte.dev/repl/418bcf45f55741e49361839687cf11fa?version=3.29.0 Expected behavior: compiler recursively checks if label ...
null
2020-08-29 06:11: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['validate a11y-label-has-associated-control-2', 'validate a11y-label-has-associated-control']
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/compiler/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:validate_special_cases"]
sveltejs/svelte
5,375
sveltejs__svelte-5375
['5367']
b1c67a16c607fdd3e2150122f58604d7a1f1dcbc
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ * Fix using `<svelte:component>` in `{:catch}` ([#5259](https://github.com/sveltejs/svelte/issues/5259)) * Fix setting one-way bound `<input>` `value` to `undefined` when it has spread attributes ([#5270](https://github.c...
diff --git a/test/runtime/samples/component-slot-fallback-6/Foo.svelte b/test/runtime/samples/component-slot-fallback-6/Foo.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-fallback-6/Foo.svelte @@ -0,0 +1 @@ +<slot /> \ No newline at end of file diff --git a/test/runtime/samples/comp...
$$props not updating nested slot **Describe the bug** A wrapper component exposes a main slot. When providing it with content that itself includes a default slot on which it spreads `$$props`, those a not reactive. ```js <Container> <div class="input"> <slot> <input type="text" {...$$props} /> ...
null
2020-09-10 10:03: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
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime component-slot-fallback-6 ', 'runtime component-slot-fallback-6 (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/shared/is_dynamic.ts->program->function_declaration:is_dynamic"]
sveltejs/svelte
5,390
sveltejs__svelte-5390
['5388']
338cf877bcd8b53f8418cda86b5685e5cb91b28e
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Fix specificity of certain styles involving a child selector ([#4795](https://github.com/sveltejs/svelte/issues/4795)) * Fix transitions that are parameterised with stores ([#5244](https://github.com/sveltejs/svelte/issue...
diff --git a/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store/_config.js b/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store/_config.js @@ -0,...
Can't use destructuring assignment to get 2 stores from object, when variables declared with let **Describe the bug** When using object destructuring assignment to extract 2 stores out of an object, like this: ```javascript let store1 let store2 ({ store1, store2, } = context); ``` , then only whichever...
In the first broken example, the compiler is outputting ```js let store1; $$subscribe_store1(); let store2; $$subscribe_store2(); $$subscribe_store1({ store1, store2 } = context); ``` which is incorrect - as opposed to the example without destructuring, where it is outputting ```js let store1; $...
2020-09-13 05:21: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
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime reactive-assignment-in-complex-declaration-with-store (with hydration)', 'runtime store-resubscribe-c (with hydration)', 'runtime store-resubscribe-c ', 'runtime reactive-assignment-in-complex-declaration-with-store ']
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/compiler/compile/render_dom/invalidate.ts->program->function_declaration:invalidate", "src/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:rewrite_props->method_definition:enter", "src/compiler/compile/render_dom/Renderer.ts->program->class_declaration:Renderer->method_defin...
sveltejs/svelte
5,400
sveltejs__svelte-5400
['5370']
04498769b5a835dcf6f0ae59f5e194fabf1b2c2a
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## Unreleased + +* Fix scoping of styles involving child selector and `*` ([#5370](https://github.com/sveltejs/svelte/issues/5370)) + ## 3.25.0 * Use `null` rather than `undefined` for coerced bound...
diff --git a/test/css/samples/unused-selector-child-combinator/_config.js b/test/css/samples/unused-selector-child-combinator/_config.js new file mode 100644 --- /dev/null +++ b/test/css/samples/unused-selector-child-combinator/_config.js @@ -0,0 +1,45 @@ +export default { + warnings: [ + { + code: "css-unused-selec...
No "unused selector" warning when unused child combinator with universal selector is present **Describe the bug** Svelte does not warn when there is an unused selector of the form `element > *` inside `<style>` tags. E.g.: ```css article > * { font-size: 36px; } ``` **Logs** No logs. **To Reproduce...
null
2020-09-15 10:10:59+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['css unused-selector-child-combinator']
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/compiler/compile/css/Selector.ts->program->function_declaration:apply_selector", "src/compiler/compile/css/Selector.ts->program->function_declaration:block_might_apply_to_node"]
sveltejs/svelte
5,442
sveltejs__svelte-5442
['5438']
41d1656458b8e2643e3751f27f147b58428d6024
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Add `|nonpassive` event modifier, explicitly passing `passive: false` ([#2068](https://github.com/sveltejs/svelte/issues/2068)) * Fix keyed `{#each}` not reacting to key changing ([#5444](https://github...
diff --git a/test/js/samples/event-modifiers/expected.js b/test/js/samples/event-modifiers/expected.js --- a/test/js/samples/event-modifiers/expected.js +++ b/test/js/samples/event-modifiers/expected.js @@ -16,41 +16,49 @@ import { } from "svelte/internal"; function create_fragment(ctx) { - let div; - let button0; ...
Passive event listener not added to touchmove [REPL](https://svelte.dev/repl/f289ef24129f475a906fdd22c0dc97e6?version=3.24.1) Open Devtools: ``` VM77:45 [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. S...
null
2020-09-23 00:58: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['js event-modifiers', 'validate event-modifiers-invalid-nonpassive', 'validate event-modifiers-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
Feature
false
true
false
false
2
0
2
false
false
["src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts->program->class_declaration:EventHandlerWrapper->method_definition:render", "src/compiler/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:validate_event_handlers"]
sveltejs/svelte
5,447
sveltejs__svelte-5447
['5444']
c3b56a164ec7ec99abb960cfd483754b96041b00
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Fix keyed `{#each}` not reacting to key changing ([#5444](https://github.com/sveltejs/svelte/issues/5444)) * Fix destructuring into store values ([#5449](https://github.com/sveltejs/svelte/issues/5449))...
diff --git a/test/runtime/samples/each-block-keyed-dyanmic-key/_config.js b/test/runtime/samples/each-block-keyed-dyanmic-key/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/each-block-keyed-dyanmic-key/_config.js @@ -0,0 +1,27 @@ +let count = 0; +let value = 'foo'; + +export default { + props:...
Keyed each is not reactive to key expression dependencies https://svelte.dev/repl/b1ed6b7fc7cf47ce9fc75f0555bcd799?version=3.26.0 ```svelte <script> export let id = 0; </script> {#each ["foo", "bar"] as key(id + key)} {Math.random()} {/each} ``` Expected a different result on every `id` change
null
2020-09-23 13:40: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime each-block-keyed-dyanmic-key (with hydration)', 'runtime each-block-keyed-dyanmic-key ']
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/compiler/compile/render_dom/wrappers/EachBlock.ts->program->class_declaration:EachBlockWrapper->method_definition:render"]
sveltejs/svelte
5,452
sveltejs__svelte-5452
['5449']
6e0cd9bcbf75645481557da23703eb051f7cec3f
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Fix destructuring into store values ([#5449](https://github.com/sveltejs/svelte/issues/5449)) * Fix erroneous `missing-declaration` warning with `use:obj.method` ([#5451](https://github.com/sveltejs/sve...
diff --git a/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store-2/_config.js b/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store-2/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store-2/_config.js ...
Destructuring into a store doesn't work since 3.26 **Describe the bug** Please look at the repl code to see what's going on. I'm trying to destructure two properties into stores which fails for the second value. It works for the first though. **To Reproduce** https://svelte.dev/repl/ee374115fae74168916e62549aa751...
Looks like the values are in there, just not destructured - https://svelte.dev/repl/17214fd2d84c4a44a6322f790886ff4f?version=3.26.0 I feel like this relates to https://github.com/sveltejs/svelte/issues/5437 and https://github.com/sveltejs/svelte/issues/5412
2020-09-24 10:27:03+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime reactive-assignment-in-complex-declaration-with-store-2 (with hydration)', 'runtime reactive-assignment-in-complex-declaration-with-store-2 ']
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/compiler/compile/render_dom/invalidate.ts->program->function_declaration:invalidate"]
sveltejs/svelte
5,454
sveltejs__svelte-5454
['5451']
4c135b0b8d7bc4cd6c47b2ea96cb3fb9e62165e7
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## Unreleased + +* Fix erroneous `missing-declaration` warning with `use:obj.method` ([#5451](https://github.com/sveltejs/svelte/issues/5451)) + ## 3.26.0 * Support `use:obj.method` as actions ([#39...
diff --git a/test/validator/samples/action-object/input.svelte b/test/validator/samples/action-object/input.svelte new file mode 100644 --- /dev/null +++ b/test/validator/samples/action-object/input.svelte @@ -0,0 +1,11 @@ +<script> + const obj = { + foo : "bar", + action(element, { leet }) { + element.foo = this.f...
3.16.0 Support use:obj.method as actions returns a svelte(missing-decalaration) Using support for 'use:obj.method={..}' returns: - (!) Plugin svelte: 'test1.say' is not defined - (!) Plugin svelte: 'test2.say' is not defined ``` <script> class Test { say(node, msg) { node.innerHTML = 'class: ' + ms...
null
2020-09-24 11:09: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['validate action-object']
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/compiler/compile/nodes/Action.ts->program->class_declaration:Action->method_definition:constructor"]
sveltejs/svelte
5,477
sveltejs__svelte-5477
['5415']
e4a3a875f364a1562916625f419fe9501e223d71
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## Unreleased + +* Ignore whitespace in `{#each}` blocks when containing elements with `animate:` ([#5477](https://github.com/sveltejs/svelte/pull/5477)) + ## 3.46.2 * Export `FlipParams` interface ...
diff --git a/test/validator/samples/animation-each-with-const/errors.json b/test/validator/samples/animation-each-with-const/errors.json new file mode 100644 --- /dev/null +++ b/test/validator/samples/animation-each-with-const/errors.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/validator/samples...
Error when using animate flip if there is no space in front of each block **Describe the bug** I got an error message `An element that use the animate directive must be the sole child of a keyed each block` when using animate flip if there is no space in front of each block. **To Reproduce** https://svelte.dev/rep...
Here's a more minimalistic reproduction. The following does not parse: ``` <div>{#each [] as n (n)} <div animate:flip /> {/each}</div> ```
2020-09-30 13:27: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['validate animation-each-with-const']
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/compiler/compile/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:constructor", "src/compiler/compile/nodes/EachBlock.ts->program->function_declaration:isEmptyNode"]
sveltejs/svelte
5,531
sveltejs__svelte-5531
['5508', '5508']
ebbbc0d298a0cdd2d7e9991f3135e03fa1208f16
diff --git a/src/compiler/compile/render_dom/wrappers/AwaitBlock.ts b/src/compiler/compile/render_dom/wrappers/AwaitBlock.ts --- a/src/compiler/compile/render_dom/wrappers/AwaitBlock.ts +++ b/src/compiler/compile/render_dom/wrappers/AwaitBlock.ts @@ -96,7 +96,7 @@ class AwaitBlockBranch extends Wrapper { `); this...
diff --git a/test/runtime/samples/await-then-destruct-object-if/_config.js b/test/runtime/samples/await-then-destruct-object-if/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/await-then-destruct-object-if/_config.js @@ -0,0 +1,29 @@ +export default { + props: { + thePromise: Promise.resolve({...
Destructured promise result in {#await} becomes undefined during re-render **Describe the bug** Values in a destructured promise result become undefined after a re-render. ```html <script> let test = 0; $: promise = Promise.resolve({ data: 1 }); </script> {#await promise then { data }} {#if data} <b...
2020-10-15 20:26: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
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime await-then-destruct-object-if (with hydration)', 'runtime await-then-destruct-object-if ']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/AwaitBlock.ts->program->class_declaration:AwaitBlockBranch->method_definition:render_destructure"]
sveltejs/svelte
5,600
sveltejs__svelte-5600
['5538']
24c44b9177b74e4010c4349242dec4ac9b712a71
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Fix setting reactive dependencies which don't appear in the template to `undefined` ([#5538](https://github.com/sveltejs/svelte/issues/5538)) * Fix ordering of elements when using `{#if}` inside `{#key}...
diff --git a/test/js/samples/instrumentation-script-main-block/expected.js b/test/js/samples/instrumentation-script-main-block/expected.js --- a/test/js/samples/instrumentation-script-main-block/expected.js +++ b/test/js/samples/instrumentation-script-main-block/expected.js @@ -62,7 +62,7 @@ function instance($$self, $...
Store does not update component in certain combination with bind + #if + store **Describe the bug** / **To Reproduce** We encountered a weird edge case in our app where where one of the stores didn't trigger any updates in a child component sometimes. There are multiple steps necessary for this bug to happen, so I'll...
null
2020-10-28 00:09:52+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['js instrumentation-script-main-block', 'js reactive-values-non-topologically-ordered', 'js unreferenced-state-not-invalidated', 'runtime reactive-value-dependency-not-referenced (with hydration)', 'runtime reactive-value-dependency-not-referenced ']
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/compiler/compile/render_dom/Renderer.ts->program->class_declaration:Renderer->method_definition:constructor"]
sveltejs/svelte
5,607
sveltejs__svelte-5607
['5565']
6fa3e91b5dd415692ef7c09643cfe1496decf179
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased * Fix `$$props` and `$$restProps` when compiling to a custom element ([#5482](https://github.com/sveltejs/svelte/issues/5482)) +* Fix function calls in `<slot>` props that use contextual values ([#5565](http...
diff --git a/test/runtime/samples/component-slot-context-props-each-nested/Nested.svelte b/test/runtime/samples/component-slot-context-props-each-nested/Nested.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-context-props-each-nested/Nested.svelte @@ -0,0 +1,14 @@ +<script> + let key...
Invalid code generated when a slot prop in an #each is a function that depends on the #each context. **Describe the bug** Code such as this: ```svelte <script> function setKey(key, value) { ... } </script> {#each keys as key} <slot {key} set={(value) => setKey(key, value)} /> {/each} ``` Generat...
null
2020-10-28 16:09: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime component-slot-context-props-each ', 'runtime component-slot-context-props-each (with hydration)', 'runtime component-slot-context-props-let (with hydration)', 'runtime component-slot-context-props-each-nested (with hydration)', 'runtime component-slot-context-props-let ', 'runtime component-slot-context-prop...
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
3
1
4
false
false
["src/compiler/compile/nodes/shared/Expression.ts->program->class_declaration:Expression->method_definition:manipulate->method_definition:leave->method_definition:enter", "src/compiler/compile/nodes/shared/Expression.ts->program->class_declaration:Expression->method_definition:manipulate->method_definition:leave", "src...
sveltejs/svelte
5,616
sveltejs__svelte-5616
['5456']
99000ef42ebc7c725ed5958fe92c17f6b255f59e
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased * Add a typed `SvelteComponent` interface ([#5431](https://github.com/sveltejs/svelte/pull/5431)) +* Support spread into `<slot>` props ([#5456](https://github.com/sveltejs/svelte/issues/5456)) * Fix settin...
diff --git a/test/runtime/samples/component-slot-spread/Nested.svelte b/test/runtime/samples/component-slot-spread/Nested.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-spread/Nested.svelte @@ -0,0 +1,7 @@ +<script> + export let obj; + export let c; + export let d; +</script> + +<sl...
Pass arbitrary properties to slot <!-- If you'd like to propose an implementation for a large new feature or change then please create an RFC: https://github.com/sveltejs/rfcs --> **Is your feature request related to a problem? Please describe.** I have run into cases where it would be nice to be able to pass ar...
I have wished for this as well... Similarly, it could be useful to have a catch-all for the `let:` directive ```svelte <Component let:$$lets> <slot {...$$lets} /> </Component> ```
2020-10-30 11: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
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime component-slot-spread ', 'ssr component-slot-spread', 'runtime component-slot-spread (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Feature
false
true
false
false
7
0
7
false
false
["src/compiler/compile/render_dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:add_spread_attributes", "src/compiler/compile/nodes/Slot.ts->program->class_declaration:Slot->method_definition:constructor", "src/compiler/compile/utils/get_slot_data.ts->program->function_declarat...
sveltejs/svelte
5,685
sveltejs__svelte-5685
['5680']
342c1e427cef72b1856f381eccff062b4ff39c2a
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Fix ordering of elements when using `{#if}` inside `{#key}` ([#5680](https://github.com/sveltejs/svelte/issues/5680)) * Add `hasContext` lifecycle function ([#5690](https://github.com/sveltejs/svelte/pu...
diff --git a/test/runtime/samples/key-block-static-if/_config.js b/test/runtime/samples/key-block-static-if/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/key-block-static-if/_config.js @@ -0,0 +1,21 @@ +export default { + html: ` + <section> + <div>Second</div> + </section> + <button>Cli...
Order of html tags changes when using key > if I need to display html when variable (in this repl - `num`) is truthy And I also need to animate `first` tag after each change of another variable(`slide`) If I have html structure like this: ```svelte {#key animateOnChangeVariable} {#if variableIsTrythy} <...
I hope I described bug clearly
2020-11-17 14:27: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime key-block-static-if ', 'runtime key-block-static-if (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/KeyBlock.ts->program->class_declaration:KeyBlockWrapper->method_definition:constructor"]
sveltejs/svelte
5,727
sveltejs__svelte-5727
['5726']
505eba84b924ab77e8414ff4937099ea7b13d889
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## Unreleased + +* Actually export `hasContext` ([#5726](https://github.com/sveltejs/svelte/issues/5726)) + ## 3.30.0 * Add a typed `SvelteComponent` interface ([#5431](https://github.com/sveltejs/s...
diff --git a/test/runtime/samples/context-api-c/Leaf.svelte b/test/runtime/samples/context-api-c/Leaf.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/context-api-c/Leaf.svelte @@ -0,0 +1,7 @@ +<script> + import { hasContext } from 'svelte'; + + const has = hasContext('test'); +</script> + +<div>{ha...
hasContext not exported **Describe the bug** `hasContext` is not exported from `src/runtime/index.ts`. **Logs** N/A **To Reproduce** Attempt to `import { hasContext } from 'svelte';`. [REPL](https://svelte.dev/repl/6774f5ab24d146e19cb5fca6ac940389?version=3.30.0) **Expected behavior** I should be able t...
null
2020-11-27 04:31:05+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime context-api-c (with hydration)', 'runtime context-api-c ', 'ssr context-api-c']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
true
false
false
false
0
0
0
false
false
[]
sveltejs/svelte
5,732
sveltejs__svelte-5732
['5722']
910348fd0d6ab175718e91412e3fc535e98a8be0
diff --git a/src/compiler/preprocess/index.ts b/src/compiler/preprocess/index.ts --- a/src/compiler/preprocess/index.ts +++ b/src/compiler/preprocess/index.ts @@ -83,8 +83,81 @@ async function replace_async( return out.concat(final_content); } -/** - * Convert a preprocessor output and its leading prefix and trai...
diff --git a/test/sourcemaps/samples/source-map-generator/_config.js b/test/sourcemaps/samples/source-map-generator/_config.js new file mode 100644 --- /dev/null +++ b/test/sourcemaps/samples/source-map-generator/_config.js @@ -0,0 +1,25 @@ +import MagicString from 'magic-string'; +import { SourceMapConsumer, SourceMap...
Error in preprocessor sourcemapping: "Cannot read property 'length' of undefined" **Describe the bug** [The new preprocessor sourcemapping feature](https://github.com/sveltejs/svelte/pull/5584/files#diff-8742d6c5cbad8aec49f195bc6d25b152ac0cd8180cb876c019f3b74736f9d62aR15) seems to sometimes cause errors (CC @halfnelso...
My analysis so far: The PostCSS processor in `svelte-preprocess` is returning a `SourceMapGenerator` instead of whatever the svelte compiler is expecting it to return. This `SourceMapGenerator` is coming directly from the `postcss` package. I'm not sure where exactly the `SourceMapGenerator` is supposed to turn into a...
2020-11-29 15:34: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['sourcemaps source-map-generator']
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/compiler/preprocess/index.ts->program->function_declaration:preprocess_tag_content", "src/compiler/preprocess/index.ts->program->function_declaration:decoded_sourcemap_from_generator", "src/compiler/preprocess/index.ts->program->function_declaration:get_replacement"]
sveltejs/svelte
5,835
sveltejs__svelte-5835
['5811']
2d697a38c5f2e8e53d842484f01fb9c709d268cb
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Fix checkbox `bind:group` in nested `{#each}` contexts ([#5811](https://github.com/sveltejs/svelte/issues/5811)) * Add graphics roles as known ARIA roles ([#5822](https://github.com/sveltejs/svelte/pull...
diff --git a/test/runtime/samples/binding-input-group-each-7/_config.js b/test/runtime/samples/binding-input-group-each-7/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/binding-input-group-each-7/_config.js @@ -0,0 +1,53 @@ +export default { + html: ` + <input type="checkbox" value="a" data-i...
bind:group on nested loop not working as expected ## bind:group on input checkbox not working as expected inside nested loop **Describe the bug** Currently I create dynamic checkbox based on nested array. I want to make role management with just check the action (C,R,U,or D) based on module. This is the minimal exa...
null
2020-12-29 08:13:35+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime binding-input-group-each-7 ', 'runtime binding-input-group-each-7 (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
3
2
5
false
false
["src/compiler/compile/render_dom/wrappers/Element/Binding.ts->program->function_declaration:get_binding_group", "src/compiler/compile/render_dom/wrappers/shared/mark_each_block_bindings.ts->program->function_declaration:mark_each_block_bindings", "src/compiler/compile/render_dom/wrappers/Element/Binding.ts->program->c...
sveltejs/svelte
5,836
sveltejs__svelte-5836
['5777']
662d9b44e6c765f54ae0fb18f1d345a94758bc6d
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Warn when using `className` or `htmlFor` attributes ([#5777](https://github.com/sveltejs/svelte/issues/5777)) * Fix checkbox `bind:group` in nested `{#each}` contexts ([#5811](https://github.com/sveltej...
diff --git a/test/validator/samples/use-the-platform/input.svelte b/test/validator/samples/use-the-platform/input.svelte new file mode 100644 --- /dev/null +++ b/test/validator/samples/use-the-platform/input.svelte @@ -0,0 +1,2 @@ +<div className="abc"></div> +<label htmlFor="i"><input /></label> \ No newline at end of...
Warn if a recovering React user accidentally types 'className' instead of 'class' [Slightly tongue-in-cheek](https://twitter.com/AdamRackis/status/1337821236622204930), but I've actually hit this myself occasionally while porting React components to Svelte: <img width="592" alt="Screen Shot 2020-12-12 at 1 42 47 PM"...
Opportunities for zing should never be passed up. ![image](https://user-images.githubusercontent.com/16696352/101992704-2a1f2a80-3c83-11eb-83a9-ca55b8c6b8d1.png) That is a property not an attribute. Edit: This was in response to a now deleted comment. I think this also applies to `for` instead of `htmlFor` and `on...
2020-12-29 08:26:59+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['validate use-the-platform']
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/compiler/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:validate_attributes"]
sveltejs/svelte
5,837
sveltejs__svelte-5837
['5749']
2d5d6b05eda9d0443f5ea3461668c9f27cc1aa98
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Fix location of automatically declared reactive variables ([#5749](https://github.com/sveltejs/svelte/issues/5749)) * Warn when using `className` or `htmlFor` attributes ([#5777](https://github.com/svel...
diff --git a/test/js/samples/capture-inject-state/expected.js b/test/js/samples/capture-inject-state/expected.js --- a/test/js/samples/capture-inject-state/expected.js +++ b/test/js/samples/capture-inject-state/expected.js @@ -98,6 +98,8 @@ let shadowedByModule; const priv = "priv"; function instance($$self, $$prop...
Cannot access 'variableName' before initialization... In this REPL: https://svelte.dev/repl/0cf61fcb843c47b7a9ba4bd6d6a891f7?version=3.31.0 this code: ```svelte let someData = { Home: "HomeData", // ... }; $: currentData = someData["NotHome"] || "DefaultData"; let myText = "Bugged ;(" function fetch()...
Here's another example: ``` import store from "./store"; let name = 'world'; $: theValue = $store; let numbersSeen = { [theValue]: true } ``` REPL: https://svelte.dev/repl/1753fac08700444985259933d4b58518?version=3.31.0 That code's obviously foolish and silly - the goal is to do something ...
2020-12-30 10:23:19+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['js capture-inject-state', 'runtime reactive-values-uninitialised ', 'runtime reactive-values-uninitialised (with hydration)', 'js unreferenced-state-not-invalidated', 'ssr reactive-values-uninitialised']
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/compiler/compile/render_ssr/index.ts->program->function_declaration:ssr", "src/compiler/compile/render_dom/index.ts->program->function_declaration:dom"]
sveltejs/svelte
5,840
sveltejs__svelte-5840
['5779']
a41c7644e68c648d9bed79817d482a29d99db830
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Fix location of automatically declared reactive variables ([#5749](https://github.com/sveltejs/svelte/issues/5749)) * Warn when using `className` or `htmlFor` attributes ([#5777](https://github.com/sveltejs/svelte/issue...
diff --git a/test/js/samples/each-block-keyed-animated/expected.js b/test/js/samples/each-block-keyed-animated/expected.js --- a/test/js/samples/each-block-keyed-animated/expected.js +++ b/test/js/samples/each-block-keyed-animated/expected.js @@ -43,7 +43,8 @@ function create_each_block(key_1, ctx) { insert(target,...
Animation with binded groups Hi there! I was trying to replicate a classic multi-select component where the selections you make go up top. Something like this: ![daa597aca528bc93503ac34a274c9d59](https://user-images.githubusercontent.com/36263538/102010794-9d3aa680-3d40-11eb-98ae-58643b09a546.gif) However, as soo...
null
2020-12-31 02:15:22+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime each-block-keyed-bind-group ', 'runtime animation-js-delay ', 'runtime animation-js-delay (with hydration)', 'js each-block-keyed', 'js each-block-keyed-animated', 'runtime each-block-keyed-bind-group (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
2
0
2
false
false
["src/compiler/compile/render_dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:add_animation", "src/compiler/compile/render_dom/wrappers/EachBlock.ts->program->class_declaration:EachBlockWrapper->method_definition:render_keyed"]
sveltejs/svelte
5,841
sveltejs__svelte-5841
['5829']
63669330f69fecaeaacba5d35faf180c3f5b9a41
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Fix checkbox `bind:group` in keyed `{#each}` where the array can be reordered ([#5779](https://github.com/sveltejs/svelte/issues/5779)) * Fix checkbox `bind:group` in nested `{#each}` contexts ([#5811](https://github.com/...
diff --git a/test/js/samples/each-block-keyed-animated/expected.js b/test/js/samples/each-block-keyed-animated/expected.js --- a/test/js/samples/each-block-keyed-animated/expected.js +++ b/test/js/samples/each-block-keyed-animated/expected.js @@ -94,7 +94,7 @@ function create_fragment(ctx) { }, p(ctx, [dirty]) { ...
Local transition in #each block is is disabled if parent node has out transition cancelled Is this about svelte@next? This project is currently in a pre-release stage and breaking changes may occur at any time. Please do not post any kind of bug reports or questions on GitHub about it. No **Describe the bug** A...
null
2020-12-31 03:23: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['js each-block-keyed', 'js each-block-keyed-animated', 'runtime transition-js-each-outro-cancelled ', 'runtime transition-js-each-outro-cancelled (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/EachBlock.ts->program->class_declaration:EachBlockWrapper->method_definition:render_keyed"]
sveltejs/svelte
5,845
sveltejs__svelte-5845
['5844']
08cb3142e962120884891825dade951e3955ef6d
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * Fix checkbox `bind:group` in nested `{#each}` contexts ([#5811](https://github.com/sveltejs/svelte/issues/5811)) * Add graphics roles as known ARIA roles ([#5822](https://github.com/sveltejs/svelte/pull/5822)) * Fix loca...
diff --git a/test/runtime/samples/action-object-deep/_config.js b/test/runtime/samples/action-object-deep/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/action-object-deep/_config.js @@ -0,0 +1,8 @@ +export default { + html: ` + <button>action</button> + `, + async test({ assert, target, wind...
Runtime error if methods in use:obj.nested.method are deeper than 2 level **Describe the bug** Introduced in #3935 support of methods in `use:obj.action` causes runtime exception if method is nested in multiple objects ```svelte <button use:ctx.button.behavior>Open</button> ``` **Logs** ``` ctx[0]['button.be...
null
2021-01-01 17:36: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime action-object-deep ', 'runtime action-object-deep (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/shared/add_actions.ts->program->function_declaration:add_action"]
sveltejs/svelte
5,847
sveltejs__svelte-5847
['5843']
dd7403ade4077c4ab032e98727e64f10b1a2352a
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Warn when using `module` variables reactively, and close weird reactivity loophole ([#5847](https://github.com/sveltejs/svelte/pull/5847)) * Throw a parser error for `class:` directives with an empty cl...
diff --git a/test/js/samples/reactive-class-optimized/expected.js b/test/js/samples/reactive-class-optimized/expected.js --- a/test/js/samples/reactive-class-optimized/expected.js +++ b/test/js/samples/reactive-class-optimized/expected.js @@ -148,12 +148,7 @@ function instance($$self, $$props, $$invalidate) { reacti...
Module Declarations are not Reactive - is this expected? **Describe the bug** When following the Tutorial, the [Module Context > Sharing Code](https://svelte.dev/tutorial/sharing-code) lesson shows that module variables are shared between components of the same type. There's nothing to say that module variables are...
Following on about compiler warnings, the idea could be generalised as: `this reactive statement will never be triggered / is unused` this means you could handle other edge cases too, ie: ```js const foo; $: console.log(foo); ``` Via: https://discord.com/channels/457912077277855764/457912077277855766/794...
2021-01-02 03: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
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['js reactive-class-optimized', 'runtime reactive-statement-module-vars ', 'runtime reactive-statement-module-vars (with hydration)', 'validate reactive-module-variable']
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/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:extract_reactive_declarations->method_definition:enter", "src/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:extract_reactive_declarations"]
sveltejs/svelte
5,849
sveltejs__svelte-5849
['5808']
82fcdfc2fa0321cd1014fe9e5c9d79b8454f2f15
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased * Rework SSR store handling to subscribe and unsubscribe as in DOM mode ([#3375](https://github.com/sveltejs/svelte/issues/3375), [#3582](https://github.com/sveltejs/svelte/issues/3582), [#3636](https://gith...
diff --git a/test/runtime/samples/transition-js-if-else-block-not-dynamic-outro/_config.js b/test/runtime/samples/transition-js-if-else-block-not-dynamic-outro/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/transition-js-if-else-block-not-dynamic-outro/_config.js @@ -0,0 +1,38 @@ +export defau...
DOM replacement breaks when a component child is in the middle of an out animation **Describe the bug** There's a race condition when you replace a component that has a child with an out transition that is currently running, svelte dies. In production, we see the old component stay on the page _in addition to_ the...
I got the same error and found a fix for it. The problem is the `{:else}` block. If you split the code up into two separate if-blocks everything works as expected. This is your example from above, but with the fix applied: https://svelte.dev/repl/dbba868b5fa64be4b750b9296c6f5cfa?version=3.31.0 You can toggle rea...
2021-01-02 04:16: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime transition-js-local-nested-each (with hydration)', 'runtime transition-js-local-nested-await (with hydration)', 'runtime window-event-context ', 'runtime transition-js-nested-each-keyed-2 ', 'runtime transition-js-local-nested-each-keyed (with hydration)', 'runtime window-binding-scroll-store ', 'runtime tran...
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/compiler/compile/render_dom/wrappers/IfBlock.ts->program->class_declaration:IfBlockWrapper->method_definition:render_compound_with_outros"]
sveltejs/svelte
5,850
sveltejs__svelte-5850
['5815']
9cc21e3c0998365cc295f3eb6af21ca69197c671
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Rework SSR store handling to subscribe and unsubscribe as in DOM mode ([#3375](https://github.com/sveltejs/svelte/issues/3375), [#3582](https://github.com/sveltejs/svelte/issues/3582), [#3636](https://github.com/sveltejs...
diff --git a/test/runtime/samples/transition-js-await-block-outros/_config.js b/test/runtime/samples/transition-js-await-block-outros/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/transition-js-await-block-outros/_config.js @@ -0,0 +1,174 @@ +let fulfil; + +export default { + props: { + prom...
Each data is duplicated when using transitions in await syntax **Describe the bug** I try to use transitions in each of my data ({#each}) that I get after my Promise resolves. But when I re-assign it to the variable that holds the Promise, the displayed data actually increases. Discord link => https://discord.com/c...
https://svelte.dev/repl/99c98342054542ca9c9a82f97c0f200c?version=3.31.0 after playing around in the repl i've known a few things - `#each` doesn't cause this ( no `#each` in above repl ) - `out` transition does try changing `transition:name` to `in:name`(no issue) or `out:name`(this one does) current behavior(to...
2021-01-02 05:08: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime transition-js-await-block-outros ', 'runtime transition-js-await-block-outros (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/runtime/internal/await_block.ts->program->function_declaration:handle_promise->function_declaration:update"]
sveltejs/svelte
5,875
sveltejs__svelte-5875
['5516']
8180c5dd6c6278f88a5ac82aecc3a2d1a5572c51
diff --git a/src/compiler/parse/state/tag.ts b/src/compiler/parse/state/tag.ts --- a/src/compiler/parse/state/tag.ts +++ b/src/compiler/parse/state/tag.ts @@ -376,7 +376,7 @@ function read_attribute(parser: Parser, unique_names: Set<string>) { if (type === 'Binding' && directive_name !== 'this') { check_unique...
diff --git a/test/parser/samples/action-duplicate/input.svelte b/test/parser/samples/action-duplicate/input.svelte new file mode 100644 --- /dev/null +++ b/test/parser/samples/action-duplicate/input.svelte @@ -0,0 +1 @@ +<input use:autofocus use:autofocus> \ No newline at end of file diff --git a/test/parser/samples/ac...
Using an action twice throws "same attribute" error https://svelte.dev/repl/01a14375951749dab9579cb6860eccde?version=3.29.0 ```ts <script> function action(){} </script> <div use:action use:action /> ``` ``` Attributes need to be unique (5:16) ```
Do you want to have the same script run twice on the node? @peopledrivemecrazy @antony I have a similar question: Is it possible to use an action twice on the same node? I have written a small animation function that looks something like this: ```html <div use:animate={{trigger: scrollY, opactiy: {start: 0, end: 20...
2021-01-11 10:01:52+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['parse action-duplicate']
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/compiler/parse/state/tag.ts->program->function_declaration:read_attribute"]
sveltejs/svelte
5,890
sveltejs__svelte-5890
['5555']
8867bc31c2a8e8d64a09e3ad626a39a4b107914c
diff --git a/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts b/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts --- a/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts +++ b/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts @@ -347,8 +347,8 @@ export de...
diff --git a/test/runtime/samples/component-binding-reactive-property-no-extra-call/Component.svelte b/test/runtime/samples/component-binding-reactive-property-no-extra-call/Component.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-binding-reactive-property-no-extra-call/Component.svelte ...
Binding to store value properties causes addition change per binding **Describe the bug** When binding to a property of a store value, the value is updated / changed (subscribe called) for each bind statement, instead of just once for the initialization. **To Reproduce** REPL: https://svelte.dev/repl/83c80ca45be54...
This actually seems to be a pretty annoying bug. It doesn't apply only to stores. Binding all complex structures (objects, arrays) fires another extra update. Here's a link to my simplified REPL. https://svelte.dev/repl/2bbb8d98fc8a49398d269dff0eb9843b?version=3.29.7 @techniq If you may, please update the bug tit...
2021-01-16 19:03:48+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime component-binding-reactive-property-no-extra-call ', 'runtime component-binding-reactive-property-no-extra-call (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts->program->class_declaration:InlineComponentWrapper->method_definition:render"]
sveltejs/svelte
5,929
sveltejs__svelte-5929
['5883']
0f3264e2056dcc0fa2d102d8d238bf15b40d614f
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased * Throw a parser error for `class:` directives with an empty class name ([#5858](https://github.com/sveltejs/svelte/issues/5858)) +* Fix extraneous store subscription in SSR mode ([#5883](https://github.com/...
diff --git a/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store-3/_config.js b/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store-3/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store-3/_config.js ...
Store get from import statement called twice in SSR **Describe the bug** While debugging memory leak issue in my playing around svelte-kit repo, I ran into this issue (not related to svelte-kit), the store still log current time after prerender request done. **To Reproduce** [Repl](https://svelte.dev/repl/5b9b1dfa...
null
2021-01-26 01:12:47+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['ssr reactive-assignment-in-complex-declaration-with-store-3']
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/compiler/compile/render_ssr/index.ts->program->function_declaration:ssr"]
sveltejs/svelte
5,939
sveltejs__svelte-5939
['5858']
4d5fe5dea6ab3264ed5d49b5baccd13b8fe38ca0
diff --git a/src/compiler/parse/state/tag.ts b/src/compiler/parse/state/tag.ts --- a/src/compiler/parse/state/tag.ts +++ b/src/compiler/parse/state/tag.ts @@ -387,6 +387,13 @@ function read_attribute(parser: Parser, unique_names: Set<string>) { }, start); } + if (type === 'Class' && directive_name === '') { +...
diff --git a/test/parser/samples/error-empty-classname-binding/error.json b/test/parser/samples/error-empty-classname-binding/error.json new file mode 100644 --- /dev/null +++ b/test/parser/samples/error-empty-classname-binding/error.json @@ -0,0 +1,10 @@ +{ + "code": "invalid-class-directive", + "message": "Class bind...
Expect a compile error when class binding name is empty **Is your feature request related to a problem? Please describe.** Yes. Sometimes dev's maybe thought that this is a bug **Describe the solution you'd like** The compiler should give a compile error **Additional context** ```svelte <h1 class:={true}>He...
null
2021-01-29 02:35:52+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['parse error-empty-classname-binding']
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/compiler/parse/state/tag.ts->program->function_declaration:read_attribute"]
sveltejs/svelte
5,957
sveltejs__svelte-5957
['5946']
8db3e8d0297e052556f0b6dde310ef6e197b8d18
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Svelte changelog +## Unreleased + +* Fix scoping of selectors with `:global()` and `~` sibling combinators ([#5499](https://github.com/sveltejs/svelte/issues/5499)) +* Fix removal of `:host` selectors as unused when com...
diff --git a/test/css/samples/host/_config.js b/test/css/samples/host/_config.js new file mode 100644 --- /dev/null +++ b/test/css/samples/host/_config.js @@ -0,0 +1,27 @@ +export default { + warnings: [ + { + code: 'css-unused-selector', + message: 'Unused CSS selector ":host > span"', + pos: 147, + start: { ...
:host <selector> query incorrectly removed as unused when with customElement / web components ## Is this about svelte@next? This project is currently in a pre-release stage and breaking changes may occur at any time. Please do not post any kind of bug reports or questions on GitHub about it. No **Describe the bug...
null
2021-02-03 15:15:26+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['css host', 'css siblings-combinator-global']
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/compiler/compile/css/Selector.ts->program->function_declaration:apply_selector", "src/compiler/compile/css/Selector.ts->program->class_declaration:Block", "src/compiler/compile/css/Selector.ts->program->class_declaration:Selector->method_definition:transform->function_declaration:encapsulate_block", "src/compiler...
sveltejs/svelte
5,984
sveltejs__svelte-5984
['5982']
160a4eccd11f586c9b5702c3f125d7c2fd52b9a0
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## Unreleased + +* Fix removal of lone `:host` selectors ([#5982](https://github.com/sveltejs/svelte/issues/5982)) + ## 3.32.2 * Fix unnecessary additional invalidation with `<Component bind:prop={o...
diff --git a/test/css/samples/host/expected.css b/test/css/samples/host/expected.css --- a/test/css/samples/host/expected.css +++ b/test/css/samples/host/expected.css @@ -1 +1 @@ -:host h1.svelte-xyz{color:red}:host>h1.svelte-xyz{color:red}:host>.svelte-xyz{color:red}:host span.svelte-xyz{color:red} \ No newline at end...
Since 3.32.2 a single :host style selector is removed when producing web components Is there a reason why, but the `:host` style selector is removed when compiling this. Works in svelte 3.32.1, but not in 3.32.2. ``` <style> :host { display: inline-block; } .hello { color: green ...
null
2021-02-11 00:02: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 prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['css host']
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/compiler/compile/css/Selector.ts->program->class_declaration:Selector->method_definition:constructor"]