repo
stringclasses
21 values
pull_number
float64
45
194k
instance_id
stringlengths
16
34
issue_numbers
stringlengths
6
27
base_commit
stringlengths
40
40
patch
stringlengths
263
270k
test_patch
stringlengths
312
408k
problem_statement
stringlengths
38
47.6k
hints_text
stringlengths
1
257k
created_at
stringdate
2016-01-11 17:37:29
2024-10-18 14:52:41
language
stringclasses
4 values
Dockerfile
stringclasses
279 values
P2P
stringlengths
2
10.2M
F2P
stringlengths
11
38.9k
F2F
stringclasses
86 values
test_command
stringlengths
27
11.4k
task_category
stringclasses
5 values
is_no_nodes
bool
2 classes
is_func_only
bool
2 classes
is_class_only
bool
2 classes
is_mixed
bool
2 classes
num_func_changes
int64
0
238
num_class_changes
int64
0
70
num_nodes
int64
0
264
is_single_func
bool
2 classes
is_single_class
bool
2 classes
modified_nodes
stringlengths
2
42.2k
sveltejs/svelte
1,978
sveltejs__svelte-1978
['1977']
8e9f37a7d47a632b7aaa2b2a90c055519da20e23
diff --git a/src/compile/render-dom/Block.ts b/src/compile/render-dom/Block.ts --- a/src/compile/render-dom/Block.ts +++ b/src/compile/render-dom/Block.ts @@ -234,29 +234,7 @@ export default class Block { this.builders.mount.addLine(`${this.autofocus}.focus();`); } - if (this.event_listeners.length > 0) { - ...
diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js --- a/test/js/samples/if-block-no-update/expected.js +++ b/test/js/samples/if-block-no-update/expected.js @@ -86,6 +86,7 @@ function create_fragment($$, ctx) { d(detach) { if_block.d(detach); + i...
Event listeners in slots REPL: https://v3.svelte.technology/repl?version=3.0.0-alpha16&gist=0bad4c3fd7428de50069a24a759dab95
null
2019-01-11 06:29: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 ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox...
['runtime component-slot-used-with-default-event (with hydration)', 'js if-block-simple', 'js if-block-no-update', 'runtime component-slot-used-with-default-event ', 'js use-elements-as-anchors']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
16
2
18
false
false
["src/utils/CodeBuilder.ts->program->class_declaration:CodeBuilder->method_definition:popCondition", "src/compile/render-dom/wrappers/Slot.ts->program->class_declaration:SlotWrapper->method_definition:render", "src/utils/CodeBuilder.ts->program->function_declaration:chunkToString", "src/utils/CodeBuilder.ts->program->f...
sveltejs/svelte
1,981
sveltejs__svelte-1981
['1973']
d3a7ccae4f760d61358e001911d35b4aee0c4d9f
diff --git a/src/preprocess/index.ts b/src/preprocess/index.ts --- a/src/preprocess/index.ts +++ b/src/preprocess/index.ts @@ -1,25 +1,25 @@ import { SourceMap } from 'magic-string'; import replaceAsync from '../utils/replaceAsync'; -export interface PreprocessOptions { +export interface PreprocessorGroup { marku...
diff --git a/test/preprocess/index.js b/test/preprocess/index.js --- a/test/preprocess/index.js +++ b/test/preprocess/index.js @@ -1,226 +1,27 @@ +import * as fs from 'fs'; import * as assert from 'assert'; -import { svelte } from '../helpers.js'; +import { loadConfig, svelte } from '../helpers.js'; describe('prepr...
Proposal: Preprocessor composition It would be nice to allow `svelte.preprocess` to be passed an array of preprocessors. Each of these would be an object containing `markup`/`style`/`script` functions. All `markup` preprocessors would be called first in order, and then all `style`/`script` ones would be called. See ...
null
2019-01-14 00:30: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 ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox...
['preprocess style-async', 'preprocess ignores-null', 'preprocess script', 'preprocess multiple-preprocessors', 'preprocess markup', 'preprocess style-attributes', 'preprocess script-multiple', 'preprocess filename', 'preprocess style', 'preprocess dependencies']
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/preprocess/index.ts->program->function_declaration:preprocess"]
sveltejs/svelte
1,982
sveltejs__svelte-1982
['1968']
a8f905f9334722c6ec47c579212e443157d34cde
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -1030,20 +1030,29 @@ export default class Component { } function process_meta(component, nodes) { - const meta: Meta = {}; + const meta: Meta = { + immutable: component.options.immutabl...
diff --git a/test/runtime/samples/immutable-option/_config.js b/test/runtime/samples/immutable-option/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/immutable-option/_config.js @@ -0,0 +1,10 @@ +export default { + immutable: true, + + html: `<div><h3>Called 1 times.</h3></div>`, + + test({ ass...
`<svelte:meta immutable/>` and `options.immutable` Having `<svelte:meta immutable/>` set does not seem to find its way into into the generated code. `safe_not_equal` is still what's used to compare values. Also, `<svelte:meta immutable={false}/>` is a compiler error, which imo should be what the syntax actually is, not...
. | `immutable:` not specified | `immutable: false` | `immutable: true` -- | -- | -- | -- `<svelte:meta>` not specified | false | false | true `<svelte:meta immutable={false}>` | false | false | false `<svelte:meta immutable={true}>` | true | true | true Ok, after discussion in Discord, I think we've reached a deci...
2019-01-15 14:32: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 ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox...
['ssr immutable-svelte-meta-false', 'runtime immutable-svelte-meta-false ', 'runtime immutable-svelte-meta-false (with hydration)', 'runtime immutable-svelte-meta ', 'runtime immutable-svelte-meta (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
3
0
3
false
false
["src/compile/Component.ts->program->function_declaration:process_meta->function_declaration:get_value", "src/compile/Component.ts->program->function_declaration:process_meta", "src/compile/render-dom/index.ts->program->function_declaration:dom"]
sveltejs/svelte
1,986
sveltejs__svelte-1986
['1985']
a8f905f9334722c6ec47c579212e443157d34cde
diff --git a/src/compile/nodes/shared/TemplateScope.ts b/src/compile/nodes/shared/TemplateScope.ts --- a/src/compile/nodes/shared/TemplateScope.ts +++ b/src/compile/nodes/shared/TemplateScope.ts @@ -1,6 +1,6 @@ export default class TemplateScope { names: Set<string>; - dependenciesForName: Map<string, string>; + dep...
diff --git a/test/runtime/samples/mutation-tracking-across-sibling-scopes/_config.js b/test/runtime/samples/mutation-tracking-across-sibling-scopes/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/mutation-tracking-across-sibling-scopes/_config.js @@ -0,0 +1,12 @@ +export default { + async test(...
(v3) alpha 17 regression: input checked binding not working It works in 15 and 16. Here are comparisons: ### Alpha 16, works: https://v3.svelte.technology/repl?version=3.0.0-alpha16&gist=c7b2ce75156639a2fae714098db7beb2 ### Alpha 17, brokedvhjen: https://v3.svelte.technology/repl?version=3.0.0-alpha17&gist=...
null
2019-01-15 23:19: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 ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox...
['runtime mutation-tracking-across-sibling-scopes ', 'runtime mutation-tracking-across-sibling-scopes (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
2
1
3
false
false
["src/compile/nodes/shared/TemplateScope.ts->program->class_declaration:TemplateScope->method_definition:add", "src/compile/nodes/shared/TemplateScope.ts->program->class_declaration:TemplateScope->method_definition:setMutable", "src/compile/nodes/shared/TemplateScope.ts->program->class_declaration:TemplateScope"]
sveltejs/svelte
1,988
sveltejs__svelte-1988
['1976']
971ed52d62736085436b823fb277810232969cbe
diff --git a/index.mjs b/index.mjs --- a/index.mjs +++ b/index.mjs @@ -3,5 +3,6 @@ export { onDestroy, beforeUpdate, afterUpdate, + nextTick, createEventDispatcher } from './internal'; diff --git a/src/internal/Component.js b/src/internal/Component.js --- a/src/internal/Component.js +++ b/src/internal/Componen...
diff --git a/test/runtime/samples/lifecycle-next-tick/_config.js b/test/runtime/samples/lifecycle-next-tick/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/lifecycle-next-tick/_config.js @@ -0,0 +1,30 @@ +export default { + async test({ assert, component, target, window }) { + const buttons = ...
beforeNextUpdate/afterNextUpdate Encountered a situation where synchronous updates are really helpful, in https://terser-playground.surge.sh/ — pressing tab doesn't indent/dedent, it focuses the next textarea instead. Which is unhelpful. It's easy to prevent the default behaviour, and relatively straightforward to i...
I'd say that finer-grained hooks are certainly useful, but it looks like you could achieve the same thing in this case with an existing `afterUpdate` lifecycle hook and a little bit of flagging. I did a sample implementation to see if I could, and it worked out pretty well. It does add a little extra permanent size ...
2019-01-17 14:21:58+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox...
['runtime lifecycle-next-tick ', 'runtime lifecycle-next-tick (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
3
0
3
false
false
["src/internal/scheduler.js->program->function_declaration:nextTick", "src/internal/scheduler.js->program->function_declaration:schedule_update", "src/internal/Component.js->program->function_declaration:make_dirty"]
sveltejs/svelte
1,990
sveltejs__svelte-1990
['1989']
4d262c4d969a2e6a08e388b523b81af8063aa1d5
diff --git a/src/compile/render-dom/wrappers/Window.ts b/src/compile/render-dom/wrappers/Window.ts --- a/src/compile/render-dom/wrappers/Window.ts +++ b/src/compile/render-dom/wrappers/Window.ts @@ -146,9 +146,9 @@ export default class WindowWrapper extends Wrapper { ${scrolling} = true; clearTimeout(${scro...
diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js --- a/test/js/samples/window-binding-scroll/expected.js +++ b/test/js/samples/window-binding-scroll/expected.js @@ -29,7 +29,7 @@ function create_fragment($$, ctx) { if (changed.y && !scrolling) { ...
Scroll bindings broken https://v3.svelte.technology/repl?version=3.0.0-alpha18&demo=parallax
null
2019-01-19 02:29: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 ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox...
['js window-binding-scroll']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compile/render-dom/wrappers/Window.ts->program->class_declaration:WindowWrapper->method_definition:render"]
sveltejs/svelte
1,991
sveltejs__svelte-1991
['1952']
4d262c4d969a2e6a08e388b523b81af8063aa1d5
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -750,18 +750,18 @@ export default class Component { } hoist_instance_declarations() { - // we can safely hoist `const` declarations that are + // we can safely hoist variable declara...
diff --git a/test/js/samples/hoisted-let/expected.js b/test/js/samples/hoisted-let/expected.js new file mode 100644 --- /dev/null +++ b/test/js/samples/hoisted-let/expected.js @@ -0,0 +1,41 @@ +/* generated by Svelte vX.Y.Z */ +import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode...
Track which variables need to be reactive [REPL](https://v3.svelte.technology/repl?version=3.0.0-alpha16&gist=3a9377863be9b866a1942cdce08a75bf). We're not taking full advantage of the information available to us. This code... ```html <script> let name = 'world'; </script> <h1>Hello {name}!</h1> ``` ...sh...
Playing around, I extended `TemplateScope` to start tracking which names are mutated, which allows code that sets up an update to check its deps for known mutation before doing so. The first pass is quite rough, and there are a fair number of test failures. The thing that jumped out most for me though, were the compone...
2019-01-19 02:42: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 ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox...
['js hoisted-let', 'js non-mutable-reference', 'js instrumentation-template-if-no-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
1
0
1
true
false
["src/compile/Component.ts->program->class_declaration:Component->method_definition:hoist_instance_declarations"]
sveltejs/svelte
1,992
sveltejs__svelte-1992
['1488']
5be480d7acabd5f1813480faca895df203183eb9
diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts --- a/src/compile/render-dom/index.ts +++ b/src/compile/render-dom/index.ts @@ -275,7 +275,7 @@ export default function dom( const definition = has_definition ? component.alias('instance') - : '@identity'; + : 'null'; const all_...
diff --git a/test/js/samples/action/expected.js b/test/js/samples/action/expected.js --- a/test/js/samples/action/expected.js +++ b/test/js/samples/action/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop...
component.set({ foo: undefined }) should 'unset' foo In the following case... ```html <svelte:component this={Whatever} bind:foo/> ``` ...it's very likely that when `Whenever` changes, you don't want the new component to have the value of `foo` from the old component imposed upon it. But if you try to clear the...
We *might* not need this, because of #1490 Would it make sense to have a `this.del('key')` that explicitly removes a key from state? (Though in all honestly, I can't think of when I've actually needed this.) In Svelte 3 we seem to have the opposite bug — the child value always overrides the parent value https://v3.sve...
2019-01-19 14:37: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 ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox...
['js non-mutable-reference', 'js event-modifiers', 'js setup-method', 'runtime component-binding-private-state (with hydration)', 'js css-media-query', 'js action', 'js event-handler-no-passive', 'js legacy-input-type', 'js hoisted-const', 'js css-shadow-dom-keyframes', 'js dynamic-import', 'js non-imported-component',...
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
2
0
2
false
false
["src/internal/Component.js->program->function_declaration:init", "src/compile/render-dom/index.ts->program->function_declaration:dom"]
sveltejs/svelte
1,993
sveltejs__svelte-1993
['1920']
5be480d7acabd5f1813480faca895df203183eb9
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -881,15 +881,10 @@ export default class Component { scope = map.get(node); } - if (parent && parent.type === 'AssignmentExpression' && node === parent.left) { - r...
diff --git a/test/js/samples/dev-warning-missing-data-computed/expected.js b/test/js/samples/dev-warning-missing-data-computed/expected.js --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -56,8 +56,8 @@ function instance($$self, $...
Prevent writing to 'computed' values [REPL](https://v3.svelte.technology/repl?version=3.0.0-alpha12&gist=589305828c887b6e7236e348db1393dd). Ideally, it wouldn't be possible to set `doubled` from outside `Nested`, because its value is set reactively. Re-running reactive declarations when their assignees are dirty (as...
null
2019-01-19 15:18: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 ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox...
['runtime reactive-values-readonly ', 'js dev-warning-missing-data-computed', 'runtime reactive-values-readonly (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compile/Component.ts->program->class_declaration:Component->method_definition:extract_reactive_declarations->method_definition:enter"]
sveltejs/svelte
2,003
sveltejs__svelte-2003
['2001']
3ec5ff77eba5e5bf350a8c2f4c9cf563cfbc5b40
diff --git a/src/compile/nodes/shared/Expression.ts b/src/compile/nodes/shared/Expression.ts --- a/src/compile/nodes/shared/Expression.ts +++ b/src/compile/nodes/shared/Expression.ts @@ -240,7 +240,7 @@ export default class Expression { dependencies.add(name); component.template_references.add(name); ...
diff --git a/test/runtime/samples/each-block-scope-shadow/_config.js b/test/runtime/samples/each-block-scope-shadow/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/each-block-scope-shadow/_config.js @@ -0,0 +1,3 @@ +export default { + html: '(alpaca)(baboon)(capybara)' +}; diff --git a/test/run...
Variables within `context=module` inaccessible from template Taking the [example from here](https://v3.svelte.technology/guide#module-context), only adding the HTML template to (visually) print the value of `answer`: When plopped into the V3 REPL: ``` actual ~> Answer: undefined expect ~> Answer: 42 ``` The ...
null
2019-01-25 20:21: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 ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox...
['runtime module-context-with-instance-script (with hydration)', 'runtime each-block-scope-shadow ', 'runtime each-block-scope-shadow (with hydration)', 'runtime module-context-with-instance-script ']
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/compile/nodes/shared/TemplateScope.ts->program->class_declaration:TemplateScope", "src/compile/nodes/shared/Expression.ts->program->function_declaration:get_function_name", "src/compile/nodes/shared/TemplateScope.ts->program->class_declaration:TemplateScope->method_definition:isTopLevel", "src/compile/nodes/share...
sveltejs/svelte
2,004
sveltejs__svelte-2004
['1995']
3ec5ff77eba5e5bf350a8c2f4c9cf563cfbc5b40
diff --git a/src/internal/await-block.js b/src/internal/await-block.js --- a/src/internal/await-block.js +++ b/src/internal/await-block.js @@ -1,5 +1,5 @@ import { assign, isPromise } from './utils.js'; -import { group_outros } from './transitions.js'; +import { check_outros, group_outros, on_outro } from './transitio...
diff --git a/test/runtime/samples/await-with-components/Widget.html b/test/runtime/samples/await-with-components/Widget.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/await-with-components/Widget.html @@ -0,0 +1,5 @@ +{value} + +<script> + export let value = 'Loading...'; +</script> \ No newline at...
await block with nested components does not remove child blocks When the pending/fulfilled (and maybe catch) blocks of an `await` contains a nested component, the block doesn't get removed when the promise fulfills or is set to a new pending promise. [REPL](https://v3.svelte.technology/repl?version=3.0.0-alpha18&gis...
null
2019-01-26 05:07:35+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox...
['runtime await-with-components (with hydration)', 'runtime await-with-components ']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/internal/await-block.js->program->function_declaration:handlePromise->function_declaration:update"]
sveltejs/svelte
2,007
sveltejs__svelte-2007
['2005']
4d7531ded7af3b4df52b0d8b4b2f3fb305636920
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -160,9 +160,12 @@ export default class Component { : this.name; this.walk_module_js(); - this.walk_instance_js(); + this.walk_instance_js_pre_template(); this.fragment = new ...
diff --git a/test/js/samples/instrumentation-template-if-no-block/expected.js b/test/js/samples/instrumentation-template-if-no-block/expected.js --- a/test/js/samples/instrumentation-template-if-no-block/expected.js +++ b/test/js/samples/instrumentation-template-if-no-block/expected.js @@ -11,7 +11,7 @@ function create...
Inline mutations aren't tracked [REPL](https://v3.svelte.technology/repl?version=3.0.0-alpha19&gist=6bf337a0d221413293a0640494692ddf). If a mutation happens inside the template, instead of in the `<script>`, it doesn't mark the value as mutable so it gets erroneously hoisted. Working on a fix
null
2019-01-26 18: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 ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox...
['runtime component-template-inline-mutation ', 'runtime component-template-inline-mutation (with hydration)', 'js instrumentation-template-if-no-block']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
5
1
6
false
false
["src/compile/Component.ts->program->class_declaration:Component->method_definition:walk_instance_js_post_template", "src/compile/Component.ts->program->class_declaration:Component->method_definition:constructor", "src/compile/Component.ts->program->class_declaration:Component->method_definition:walk_instance_js_pre_te...
sveltejs/svelte
2,009
sveltejs__svelte-2009
['2000', '2000']
eccc8b264d9855190fa74c1bf59098c9fd9efc18
diff --git a/src/compile/render-dom/Block.ts b/src/compile/render-dom/Block.ts --- a/src/compile/render-dom/Block.ts +++ b/src/compile/render-dom/Block.ts @@ -223,6 +223,7 @@ export default class Block { if (!this.builders.intro.isEmpty()) { this.builders.intro.addLine(`#current = true;`); + this.builders...
diff --git a/test/js/samples/component-static-array/expected.js b/test/js/samples/component-static-array/expected.js --- a/test/js/samples/component-static-array/expected.js +++ b/test/js/samples/component-static-array/expected.js @@ -13,6 +13,7 @@ function create_fragment(ctx) { m(target, anchor) { mount_comp...
Transitions going wrong with keyed each block In [this example](https://v3.svelte.technology/repl?version=3.0.0-alpha19&gist=60468d4a462945ce61f77be060deec05), I don't think transitions should be happening at all when you hit 'shuffle' — no elements are being removed from the DOM and reinserted, they're just moving abo...
Interesting point is that if we use `index` as a `key`, transitions never happen: https://v3.svelte.technology/repl?version=3.0.0-alpha19&gist=9b515856fdc42890c673d87de7c4ae52 If not use a `key` at all, the transition happens only once for each item. Interesting point is that if we use `index` as a `key`, tran...
2019-01-27 04:43: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 ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox...
['js component-static-array', 'js component-static', 'runtime transition-js-each-unchanged (with hydration)', 'runtime transition-js-each-unchanged ', 'js component-static-immutable2', 'js transition-local', 'js component-static-immutable', 'runtime transition-js-each-keyed-unchanged (with hydration)', 'runtime transit...
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
10
0
10
false
false
["src/compile/render-dom/Block.ts->program->class_declaration:Block->method_definition:getContents", "src/internal/keyed-each.js->program->function_declaration:updateKeyedEach->function_declaration:insert", "src/internal/Component.js->program->function_declaration:init", "src/internal/await-block.js->program->function_...
sveltejs/svelte
2,010
sveltejs__svelte-2010
['1997']
9f800fb914010ae790eb856ad829687e50805732
diff --git a/src/compile/render-dom/wrappers/Element/Binding.ts b/src/compile/render-dom/wrappers/Element/Binding.ts --- a/src/compile/render-dom/wrappers/Element/Binding.ts +++ b/src/compile/render-dom/wrappers/Element/Binding.ts @@ -221,6 +221,17 @@ function getEventHandler( snippet: string ) { const value = get...
diff --git a/test/runtime/samples/binding-store-deep/_config.js b/test/runtime/samples/binding-store-deep/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/binding-store-deep/_config.js @@ -0,0 +1,5 @@ +export default { + error(assert, err) { + assert.equal(err.message, `Cannot bind to a nested ...
3.0.0-alpha18: select value binding against a store does not update all subscriptions Hi, I'm trying to set a store value through a value binding of select input. After changing the select, the value get's updated correctly in the same component where the select is, but other components that may be subscribed to the...
I think I'm running into the same issue, but I'm seeing it with a smaller repro: ```html <script> import { writable, derive } from "svelte/store"; const a = writable(1); const b = writable(2); const c = derive([ a, b ], ([ a, b ]) => a + b); </script> a: <input bind:value={$a}/> <hr /...
2019-01-27 14:27: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 ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox...
['runtime binding-store (with hydration)', 'runtime binding-store-deep (with hydration)', 'runtime binding-store-deep ', 'runtime binding-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
2
0
2
false
false
["src/compile/render-dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:addBindings", "src/compile/render-dom/wrappers/Element/Binding.ts->program->function_declaration:getEventHandler"]
sveltejs/svelte
2,044
sveltejs__svelte-2044
['2036']
df318d29768921be24586995dbb4302c260914bf
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -142,11 +142,6 @@ export default class Component { } add_var(variable: Var) { - // TODO remove this - if (this.var_lookup.has(variable.name)) { - throw new Error(`dupe: ${variable....
diff --git a/test/stats/samples/duplicate-globals/_config.js b/test/stats/samples/duplicate-globals/_config.js new file mode 100644 --- /dev/null +++ b/test/stats/samples/duplicate-globals/_config.js @@ -0,0 +1,5 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, []); + }, +}; diff --git a/tes...
Can't use same global in instance and module scripts ```html <script context="module"> console.log(1); </script> <script> console.log(2); </script> ``` I think this is a simple fix — just need to check that `console` hasn't already been declared with `add_var` before adding it a second time
Yeah it looks like this takes care of this specific issue. ```diff diff --git a/src/compile/Component.ts b/src/compile/Component.ts index c9304ee5..e8672477 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -538,7 +538,7 @@ export default class Component { globals.forEach(...
2019-02-04 01:04: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 ', '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 ...
['stats duplicate-non-hoistable', 'stats duplicate-vars', 'stats duplicate-globals']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
3
0
3
false
false
["src/compile/Component.ts->program->class_declaration:Component->method_definition:hoist_instance_declarations", "src/compile/Component.ts->program->class_declaration:Component->method_definition:walk_module_js", "src/compile/Component.ts->program->class_declaration:Component->method_definition:add_var"]
sveltejs/svelte
2,045
sveltejs__svelte-2045
['2037']
df318d29768921be24586995dbb4302c260914bf
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -744,10 +744,14 @@ export default class Component { }); } + const suffix = code.original[declarator.end] === ';' + ? ` = $$props` + : ` = $$p...
diff --git a/test/runtime/samples/prop-without-semicolon-b/_config.js b/test/runtime/samples/prop-without-semicolon-b/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/prop-without-semicolon-b/_config.js @@ -0,0 +1,7 @@ +export default { + props: { + name: 'world' + }, + + html: `<h1>Hello world...
ASI confused by turning export statement into `$$props` destructuring ```html <script> export let foo, bar (() => {})() </script> ``` The `export` is turned into `let { foo, bar } = $$props` which causes a semicolon issue with the following line.
null
2019-02-04 01:39: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 ', '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 ...
['runtime prop-without-semicolon-b (with hydration)', 'ssr prop-without-semicolon-b', 'runtime prop-without-semicolon-b ']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
2
0
2
false
false
["src/compile/Component.ts->program->class_declaration:Component->method_definition:rewrite_props->method_definition:enter", "src/compile/Component.ts->program->class_declaration:Component->method_definition:rewrite_props"]
sveltejs/svelte
2,062
sveltejs__svelte-2062
['2059']
e525b83d159928e85d494989ff02789b136afdf8
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -20,7 +20,6 @@ import TemplateScope from './nodes/shared/TemplateScope'; import fuzzymatch from '../utils/fuzzymatch'; import { remove_indentation, add_indentation } from '../utils/indenta...
diff --git a/test/runtime/samples/reactive-values-implicit/_config.js b/test/runtime/samples/reactive-values-implicit/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/reactive-values-implicit/_config.js @@ -0,0 +1,14 @@ +export default { + html: ` + <p>1 + 2 = 3</p> + <p>3 * 3 = 9</p> + `, + +...
Auto-declare variables in reactive declarations, in certain cases At present you have to declare all variables that are assigned to in reactive declarations: ```js let b; $: b = a + 1; ``` It would be much nicer to just do this: ```js $: b = a + 1; ``` In other words if the body is an `ExpressionStatem...
null
2019-02-06 19:51: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 ', '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 ...
['stats implicit-reactive', 'runtime reactive-values-implicit ', 'ssr reactive-values-implicit', 'runtime reactive-values-implicit (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
false
false
true
6
1
7
false
false
["src/compile/render-dom/index.ts->program->function_declaration:dom", "src/compile/Component.ts->program->class_declaration:Component->method_definition:walk_instance_js_pre_template", "src/compile/Component.ts->program->class_declaration:Component->method_definition:extract_reactive_declarations", "src/compile/Compon...
sveltejs/svelte
2,063
sveltejs__svelte-2063
['2055']
be3808dd08817412a4e3f380732e1a991ab2fc40
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -1002,7 +1002,8 @@ export default class Component { const object = getObject(node); const { name } = object; - if (name[0] === '$' || component.var_lookup.has(name)) ...
diff --git a/test/runtime/samples/reactive-values-non-cyclical/_config.js b/test/runtime/samples/reactive-values-non-cyclical/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/reactive-values-non-cyclical/_config.js @@ -0,0 +1,17 @@ +export default { + props: { + x: 42 + }, + + html: ` + <p>42 ...
Cyclical dependency detection fails to account for scope This throws an incorrect 'Cyclical dependency detected' error, because it thinks `b` depends on `a`: ```html <script> export let x; let a; let b; $: a = b; $: b = (function(a) { return a; }(x)); </script> ```
null
2019-02-07 16:11: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 ', '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 ...
['runtime reactive-values-non-cyclical (with hydration)', 'ssr reactive-values-non-cyclical', 'runtime reactive-values-non-cyclical ']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compile/Component.ts->program->class_declaration:Component->method_definition:extract_reactive_declarations->method_definition:enter"]
sveltejs/svelte
2,064
sveltejs__svelte-2064
['2054']
be3808dd08817412a4e3f380732e1a991ab2fc40
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -1056,6 +1056,10 @@ export default class Component { }); } + if (this.reactive_declarations.indexOf(declaration) !== -1) { + return; + } + seen.add(declaration); ...
diff --git a/test/js/samples/reactive-values-non-topologically-ordered/expected.js b/test/js/samples/reactive-values-non-topologically-ordered/expected.js new file mode 100644 --- /dev/null +++ b/test/js/samples/reactive-values-non-topologically-ordered/expected.js @@ -0,0 +1,53 @@ +/* generated by Svelte vX.Y.Z */ +im...
Reactive declarations are emitted twice If reactive declarations [aren't written in topological order](https://v3.svelte.technology/repl?version=3.0.0-beta.1&gist=e4ac1a9530cfdfd53016c46191b342c7)... ```html <script> export let x; let a; let b; $: a = b; $: b = x; </script> ``` ...they get dupl...
null
2019-02-07 16:21: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 ', '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 ...
['js reactive-values-non-topologically-ordered']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compile/Component.ts->program->class_declaration:Component->method_definition:extract_reactive_declarations"]
sveltejs/svelte
2,065
sveltejs__svelte-2065
['2061']
cf775486cf956ba699ba9616f1091fa8f444d597
diff --git a/src/compile/render-dom/wrappers/Slot.ts b/src/compile/render-dom/wrappers/Slot.ts --- a/src/compile/render-dom/wrappers/Slot.ts +++ b/src/compile/render-dom/wrappers/Slot.ts @@ -63,7 +63,7 @@ export default class SlotWrapper extends Wrapper { get_slot_changes = renderer.component.getUniqueName(`get_${s...
diff --git a/test/runtime/samples/component-slot-let-static/Nested.html b/test/runtime/samples/component-slot-let-static/Nested.html new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-let-static/Nested.html @@ -0,0 +1 @@ +<slot value="Hi" /> \ No newline at end of file diff --git a/test/runtim...
Error with static slot scope values A slot with a static scope value (`<slot value="Hi" />`) tries to get a variable named `Hi`, throwing `Hi is not defined`. REPL: https://v3.svelte.technology/repl?version=3.0.0-beta.1&gist=7d9d362f30f917013bf8d91e9364b28d
It looks like the problem is here: https://github.com/sveltejs/svelte/blob/c2e6d1bf0db20272a4ce53ffbf62c96e4e468ce3/src/utils/get_slot_data.ts#L14 But I'm not sure what we should have there instead. `stringify_attribute` turns things like `foo{bar}` into `foo${escape(bar)}`, so perhaps we should be enclosing its ...
2019-02-07 16:36:52+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['ssr component-slot-let-static', 'runtime component-slot-let-static ', 'runtime component-slot-let-static (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
3
0
3
false
false
["src/compile/render-dom/wrappers/Slot.ts->program->class_declaration:SlotWrapper->method_definition:render", "src/utils/stringify_attribute.ts->program->function_declaration:stringify_attribute", "src/utils/get_slot_data.ts->program->function_declaration:get_slot_data"]
sveltejs/svelte
2,066
sveltejs__svelte-2066
['2052']
cf775486cf956ba699ba9616f1091fa8f444d597
diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts --- a/src/compile/render-dom/index.ts +++ b/src/compile/render-dom/index.ts @@ -314,7 +314,13 @@ export default function dom( if (has_definition) { const reactive_declarations = component.reactive_declarations.map(d => { - const con...
diff --git a/test/js/samples/reactive-values-non-writable-dependencies/expected.js b/test/js/samples/reactive-values-non-writable-dependencies/expected.js new file mode 100644 --- /dev/null +++ b/test/js/samples/reactive-values-non-writable-dependencies/expected.js @@ -0,0 +1,40 @@ +/* generated by Svelte vX.Y.Z */ +im...
Only account for reassigned/mutated vars in reactive dirty checks In [this example](https://v3.svelte.technology/repl?version=3.0.0-beta.1&gist=8aaa43f0fe81a2f66ac76a38fc04fb66)... ```html <script> let a = 1; let b = 2; let max; $: max = Math.max(a, b); </script> <label> <input type=range bind:valu...
Here are two similar cases: (introduced in alpha 21) https://github.com/thgh/svelte-number-gauge/commit/e0d5a483cc106d75009b6802a809698b2e0ac65d#diff-0b3178d0b21a965441ff7323d2523a23R393 => `bg` is a simple component function and will never change https://github.com/thgh/svelte-number-gauge/commit/e0d5a483cc106d...
2019-02-07 16:44:22+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['js reactive-values-non-writable-dependencies']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compile/render-dom/index.ts->program->function_declaration:dom"]
sveltejs/svelte
2,083
sveltejs__svelte-2083
['2038']
d61616e148156451880b490dfba5af09e96fb859
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -69,6 +69,7 @@ export default class Component { reactive_declaration_nodes: Set<Node> = new Set(); has_reactive_assignments = false; injected_reactive_declaration_vars: Set<string> = n...
diff --git a/test/runtime/samples/props-excludes-external/RenderProps.svelte b/test/runtime/samples/props-excludes-external/RenderProps.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/props-excludes-external/RenderProps.svelte @@ -0,0 +1,7 @@ +<svelte:options bind:props/> + +<script> + let props; +...
Internal variables showing up in svelte:options bind:props v3 alpha27 When using `<svelte:options bind:props` in a component where there is slot default content, the props object contains `$$slot_default` and `$$scope`. This causes an error when using the spread operator on html elements eg `<h1 {...props}` https:...
null
2019-02-14 22:49:52+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['runtime props-excludes-external ', 'runtime props-excludes-external (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/compile/Component.ts->program->class_declaration:Component->method_definition:constructor", "src/internal/utils.js->program->function_declaration:exclude_internal_props", "src/compile/Component.ts->program->class_declaration:Component->method_definition:rewrite_props->method_definition:enter", "src/compile/Compon...
sveltejs/svelte
2,091
sveltejs__svelte-2091
['2072']
fa1322b00b1e1ba815ea18406283abefa270b334
diff --git a/store.mjs b/store.mjs --- a/store.mjs +++ b/store.mjs @@ -34,7 +34,8 @@ export function readable(start, value) { }; } -export function writable(value) { +export function writable(value, start = noop) { + let stop; const subscribers = []; function set(newValue) { @@ -51,11 +52,13 @@ export functi...
diff --git a/test/store/index.js b/test/store/index.js --- a/test/store/index.js +++ b/test/store/index.js @@ -21,6 +21,27 @@ describe('store', () => { assert.deepEqual(values, [0, 1, 2]); }); + + it('calls provided subscribe handler', () => { + let called = 0; + + const store = writable(0, () => { + c...
Add second argument to `writable` I think I've found a use case that isn't served by `writable` and `readable` — namely, it's not possible for a writable store to know whether or not it has any subscribers, and it's very difficult to change the parameters of a readable store after it's been created. This bit me in a...
At first glance, it looks like mixing concerns a bit. At second glance, I'm not sure how you'd get separation without feeling over-engineered, so, yeah. This would cover lazy stores nicely too, which is very helpful. A custom lazy store could start with an unresolved promise to be used in an `{#await}`, kick off val...
2019-02-17 17:20: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 ', '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 ...
['store writable calls provided subscribe handler']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Feature
true
false
false
false
0
0
0
false
false
[]
sveltejs/svelte
2,092
sveltejs__svelte-2092
['2042']
fa1322b00b1e1ba815ea18406283abefa270b334
diff --git a/src/compile/nodes/shared/Node.ts b/src/compile/nodes/shared/Node.ts --- a/src/compile/nodes/shared/Node.ts +++ b/src/compile/nodes/shared/Node.ts @@ -49,7 +49,6 @@ export default class Node { } warnIfEmptyBlock() { - if (!this.component.compileOptions.dev) return; if (!/Block$/.test(this.type) ||...
diff --git a/test/validator/samples/empty-block-dev/_config.js b/test/validator/samples/empty-block-dev/_config.js deleted file mode 100644 --- a/test/validator/samples/empty-block-dev/_config.js +++ /dev/null @@ -1,3 +0,0 @@ -export default { - dev: true -}; \ No newline at end of file diff --git a/test/validator/samp...
Proposal: `dev: true` only affects runtime warnings and errors Right now, compiling with `dev: true` causes the compiler to emit a bunch of code to display additional runtime warnings and errors, to assist with debugging - and it also enables a compile-time warning for empty blocks. As far as I can tell, the empty bloc...
null
2019-02-17 17:36: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 ', '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 ...
['validate empty-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
1
0
1
true
false
["src/compile/nodes/shared/Node.ts->program->class_declaration:Node->method_definition:warnIfEmptyBlock"]
sveltejs/svelte
2,093
sveltejs__svelte-2093
['2042']
fa1322b00b1e1ba815ea18406283abefa270b334
diff --git a/src/Stats.ts b/src/Stats.ts --- a/src/Stats.ts +++ b/src/Stats.ts @@ -26,8 +26,6 @@ function collapseTimings(timings) { } export default class Stats { - onwarn: (warning: Warning) => void; - startTime: number; currentTiming: Timing; currentChildren: Timing[]; @@ -35,15 +33,11 @@ export default cl...
diff --git a/test/css/index.js b/test/css/index.js --- a/test/css/index.js +++ b/test/css/index.js @@ -2,7 +2,7 @@ import * as assert from 'assert'; import * as fs from 'fs'; import { env, normalizeHtml, svelte } from '../helpers.js'; -function tryRequire(file) { +function try_require(file) { try { const mod =...
Proposal: `dev: true` only affects runtime warnings and errors Right now, compiling with `dev: true` causes the compiler to emit a bunch of code to display additional runtime warnings and errors, to assist with debugging - and it also enables a compile-time warning for empty blocks. As far as I can tell, the empty bloc...
null
2019-02-17 17:43: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 ', '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 ...
['validate empty-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
false
false
true
4
1
5
false
false
["src/Stats.ts->program->class_declaration:Stats->method_definition:warn", "src/compile/index.ts->program->function_declaration:compile", "src/Stats.ts->program->class_declaration:Stats->method_definition:constructor", "src/compile/nodes/shared/Node.ts->program->class_declaration:Node->method_definition:warnIfEmptyBloc...
sveltejs/svelte
2,096
sveltejs__svelte-2096
['2024']
89b00c7d308f8463d630adbbcb03f30253001119
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -28,6 +28,7 @@ type ComponentOptions = { immutable?: boolean; props?: string; props_object?: string; + props_node?: Node; }; // We need to tell estree-walker that it should always ...
diff --git a/test/runtime/samples/props-implicit/_config.js b/test/runtime/samples/props-implicit/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/props-implicit/_config.js @@ -0,0 +1,17 @@ +export default { + props: { + x: 1 + }, + + html: ` + <pre>{"x":1}</pre> + `, + + async test({ assert, ...
`bind:props` with undeclared variable silently ignored Compiling `<svelte:options bind:props={foo}/>` or `<script></script><svelte:options bind:props={foo}/>` silently ignores the `bind:props` option. These should both be at least a warning, possibly an error. (We don't want to implicitly define a prop in the first cas...
null
2019-02-17 18:45: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 ', '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 ...
['ssr props-undeclared', 'ssr props-implicit', 'runtime props-implicit ', 'runtime props-undeclared ', 'runtime props-undeclared (with hydration)', 'runtime props-implicit (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
4
0
4
false
false
["src/compile/render-ssr/index.ts->program->function_declaration:ssr", "src/compile/Component.ts->program->class_declaration:Component->method_definition:constructor", "src/compile/Component.ts->program->function_declaration:process_component_options", "src/compile/render-dom/index.ts->program->function_declaration:dom...
sveltejs/svelte
2,097
sveltejs__svelte-2097
['2031']
89b00c7d308f8463d630adbbcb03f30253001119
diff --git a/src/compile/render-dom/wrappers/Element/index.ts b/src/compile/render-dom/wrappers/Element/index.ts --- a/src/compile/render-dom/wrappers/Element/index.ts +++ b/src/compile/render-dom/wrappers/Element/index.ts @@ -203,6 +203,10 @@ export default class ElementWrapper extends Wrapper { if (this.slot_blo...
diff --git a/test/runtime/samples/component-slot-nested-in-element/One.svelte b/test/runtime/samples/component-slot-nested-in-element/One.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-nested-in-element/One.svelte @@ -0,0 +1,11 @@ +<script> + import Two from './Two.svelte'; +</scrip...
Nesting slots broke in alpha19 [REPL](https://v3.svelte.technology/repl?version=3.0.0-alpha24&gist=82d12c72e4da0e37e5573ce188570464) Nested provides a slot that should get injected into Sub. Since alpha19 it throws `Failed to execute 'appendChild' on 'Node': The new child element contains the parent.`.
null
2019-02-17 19:18: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 ', '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 ...
['runtime component-slot-nested-in-element (with hydration)', 'runtime component-slot-nested-in-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
true
false
false
2
0
2
false
false
["src/compile/render-dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:render", "src/compile/render-dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:constructor"]
sveltejs/svelte
2,099
sveltejs__svelte-2099
['2014']
47ab23c1deb022aea48f61e79ad4ad1ed2289cfc
diff --git a/package.json b/package.json --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ ], "scripts": { "test": "mocha --opts mocha.opts", + "test:unit": "mocha --require sucrase/register --recursive ./**/__test__.ts", "quicktest": "mocha --opts mocha.opts", "precoverage": "c8 mocha --o...
diff --git a/src/utils/__test__.ts b/src/utils/__test__.ts --- a/src/utils/__test__.ts +++ b/src/utils/__test__.ts @@ -34,6 +34,45 @@ describe('deindent', () => { assert.equal(deindented, `before\n\tline one\n\tline two\nafter`); }); + + it('removes newlines before an empty expression', () => { + const deindent...
Update store bindings when stores change [This works...](https://v3.svelte.technology/repl?version=3.0.0-alpha21&gist=10aa8a10f0d48c466271b36a59506929) ```html <script> import { writable } from 'svelte/store'; let foo = writable(0); </script> <h1>{$foo}</h1> <button on:click="{() => foo.update(n => n + 1...
null
2019-02-18 04:08:12+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['runtime store-auto-subscribe-immediate (with hydration)', 'runtime store-auto-subscribe-immediate-multiple-vars ', 'runtime store-auto-subscribe-immediate-multiple-vars (with hydration)', 'ssr store-auto-subscribe-immediate', 'runtime store-resubscribe ', 'runtime store-auto-subscribe-immediate ', 'runtime store-resu...
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
15
1
16
false
false
["src/compile/render-dom/index.ts->program->function_declaration:dom", "src/utils/deindent.ts->program->function_declaration:deindent", "src/compile/render-dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:addBindings", "src/compile/Component.ts->program->class_declaration:Comp...
sveltejs/svelte
2,111
sveltejs__svelte-2111
['2108']
ef3f75ad7d7721337804dab09d15081ca9465c90
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -433,7 +433,7 @@ export default class Component { }); } - extract_imports(content, is_module: boolean) { + extract_imports(content) { const { code } = this; content.body.forEa...
diff --git a/test/runtime/samples/store-imported-module-b/_config.js b/test/runtime/samples/store-imported-module-b/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/store-imported-module-b/_config.js @@ -0,0 +1,3 @@ +export default { + error: `Cannot reference store value inside <script context=...
Autosubscription from script to imported store crashes compiler ```html <script> import foo from 'foo'; console.log($foo); </script> ``` This throws an exception (`Cannot set property 'subscribable' of undefined`) in the compiler under the latest beta.
`Component.walk_instance_js_pre_template()` skips the `this.add_var()` call when the node in question is an import - but later we're attempting to look up the base variable name in `this.var_lookup`, which is undefined because we skipped over the import. -- Possibly relatedly, the following does not crash: ```...
2019-02-20 02:17: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 ', '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 ...
['runtime store-imported ', 'runtime store-imported-module-b (with hydration)', 'ssr store-imported-module', 'runtime store-imported-module-b ', 'runtime store-imported (with hydration)', 'ssr store-imported', 'ssr store-imported-module-b']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
7
0
7
false
false
["src/compile/Component.ts->program->class_declaration:Component->method_definition:walk_module_js", "src/utils/annotateWithScopes.ts->program->function_declaration:createScopes->method_definition:enter", "src/compile/Component.ts->program->class_declaration:Component->method_definition:extract_exports", "src/compile/C...
sveltejs/svelte
2,117
sveltejs__svelte-2117
['2110']
3409840eb69735065e28d1e4ec55e95915a1e963
diff --git a/src/compile/render-dom/wrappers/Element/index.ts b/src/compile/render-dom/wrappers/Element/index.ts --- a/src/compile/render-dom/wrappers/Element/index.ts +++ b/src/compile/render-dom/wrappers/Element/index.ts @@ -205,8 +205,8 @@ export default class ElementWrapper extends Wrapper { block.parent.addDep...
diff --git a/test/runtime/samples/component-slot-named-b/Nested.svelte b/test/runtime/samples/component-slot-named-b/Nested.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-named-b/Nested.svelte @@ -0,0 +1 @@ +<slot name="name"></slot> \ No newline at end of file diff --git a/test/run...
Named slot bug A named slot that contains a variable has a bug in v3.0.0-beta.5 https://v3.svelte.technology/repl?version=3.0.0-beta.5&gist=89e16e7c3cc78b52369145fc8552ebf1 vs https://v3.svelte.technology/repl?version=3.0.0-beta.3&gist=89e16e7c3cc78b52369145fc8552ebf1
null
2019-02-20 14:09: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 ', '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 ...
['runtime component-slot-named-b (with hydration)', 'runtime component-slot-named-b ']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compile/render-dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:constructor"]
sveltejs/svelte
2,125
sveltejs__svelte-2125
['2124']
d6e85bc25fe7f144ed863d5408df44cc41980a14
diff --git a/src/compile/render-dom/wrappers/Element/index.ts b/src/compile/render-dom/wrappers/Element/index.ts --- a/src/compile/render-dom/wrappers/Element/index.ts +++ b/src/compile/render-dom/wrappers/Element/index.ts @@ -132,7 +132,7 @@ export default class ElementWrapper extends Wrapper { const name = attr...
diff --git a/test/runtime/samples/component-slot-named-c/Nested.svelte b/test/runtime/samples/component-slot-named-c/Nested.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-named-c/Nested.svelte @@ -0,0 +1 @@ +<slot name="name"></slot> \ No newline at end of file diff --git a/test/run...
Named slot bug v3.0.0-beta.7 Named slot bug (sorry) https://v3.svelte.technology/repl?version=3.0.0-beta.7&gist=cbc0e3e7a6de3963a72546e95361b369 vs https://v3.svelte.technology/repl?version=3.0.0-beta.6&gist=cbc0e3e7a6de3963a72546e95361b369
A related bug: https://v3.svelte.technology/repl?version=3.0.0-beta.7&gist=bfcbe5396ef0dcb5f1ad252b7650b31d Looks like the names of the two `<Nested>` component instances aren't being deconflicted
2019-02-22 04:34:57+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_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 ...
['runtime component-slot-named-c (with hydration)', 'runtime component-slot-named-c ']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compile/render-dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:constructor"]
sveltejs/svelte
2,136
sveltejs__svelte-2136
['2133']
c672ad8df7a2f3c9d763dccc6b13d8283d14ec1d
diff --git a/src/compile/nodes/Action.ts b/src/compile/nodes/Action.ts --- a/src/compile/nodes/Action.ts +++ b/src/compile/nodes/Action.ts @@ -14,6 +14,7 @@ export default class Action extends Node { component.warn_if_undefined(info, scope); this.name = info.name; + component.qualify(info.name); this.expr...
diff --git a/test/vars/index.js b/test/vars/index.js --- a/test/vars/index.js +++ b/test/vars/index.js @@ -14,47 +14,41 @@ describe('vars', () => { throw new Error('Forgot to remove `solo: true` from test'); } - (solo ? it.only : skip ? it.skip : it)(dir, () => { - const config = loadConfig(`./vars/samples/...
Certain directives don't cause `vars` to be `referenced` when compilation isn't with `generate: 'dom'` At the very least, it looks like `referenced` is false for variables used as actions when `generate: false` is specified. (They look okay when a compiled component is being generated, though.) I'll have to go through ...
null
2019-02-26 15:01: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 ...
['vars actions, generate: false', 'vars transitions, generate: ssr', 'vars animations, generate: ssr', 'vars actions, generate: ssr', 'vars transitions, generate: false', 'vars animations, generate: false']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
3
0
3
false
false
["src/compile/nodes/Action.ts->program->class_declaration:Action->method_definition:constructor", "src/compile/nodes/Transition.ts->program->class_declaration:Transition->method_definition:constructor", "src/compile/nodes/Animation.ts->program->class_declaration:Animation->method_definition:constructor"]
sveltejs/svelte
2,138
sveltejs__svelte-2138
['2137']
5bf3b0bb6a183d3e80b1c6dc3b9502ef7d5a1e4b
diff --git a/src/parse/state/mustache.ts b/src/parse/state/mustache.ts --- a/src/parse/state/mustache.ts +++ b/src/parse/state/mustache.ts @@ -86,58 +86,73 @@ export default function mustache(parser: Parser) { block.end = parser.index; parser.stack.pop(); - } else if (parser.eat(':elseif')) { - const block = p...
diff --git a/test/parser/samples/if-block-elseif/input.svelte b/test/parser/samples/if-block-elseif/input.svelte --- a/test/parser/samples/if-block-elseif/input.svelte +++ b/test/parser/samples/if-block-elseif/input.svelte @@ -1,5 +1,5 @@ {#if x > 10} <p>x is greater than 10</p> -{:elseif x < 5} +{:else if x < 5} ...
{:elseif foo} or {:else if foo} ? Writing the docs for v3, got to the section on `{:elseif ...}` and realised that I couldn't quite justify why it's that instead of `{:else if ...}`. Should we change it? If so, now would be the time to do it. Arguments for changing (sound off in the comments and I'll update the b...
In case you have a preference but don't feel like writing an essay about it, I've created a poll: https://www.strawpoll.me/17510302 Perhaps allow for both? PHP for example allows for this
2019-02-27 13:20: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 ', '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 ...
['runtime if-block-elseif ', 'ssr dynamic-component-slot', 'runtime if-block-outro-nested-else ', 'runtime dynamic-component-slot (with hydration)', 'runtime if-block-elseif-text ', 'ssr transition-js-if-elseif-block-outro', 'runtime if-block-elseif-no-else (with hydration)', 'ssr if-block-elseif-text', 'ssr if-block-e...
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Feature
false
true
false
false
1
0
1
true
false
["src/parse/state/mustache.ts->program->function_declaration:mustache"]
sveltejs/svelte
2,145
sveltejs__svelte-2145
['2060']
5459b71276deaa9d16458aca61b58631fcd6aa10
diff --git a/store.mjs b/store.mjs --- a/store.mjs +++ b/store.mjs @@ -1,4 +1,4 @@ -import { run_all, noop } from './internal'; +import { run_all, noop, get_store_value } from './internal'; export function readable(start, value) { const subscribers = []; @@ -103,3 +103,5 @@ export function derive(stores, fn) { ...
diff --git a/test/store/index.js b/test/store/index.js --- a/test/store/index.js +++ b/test/store/index.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import { readable, writable, derive } from '../../store.js'; +import { readable, writable, derive, get } from '../../store.js'; describe('store', () => { de...
Any way to read the value of a writable? In my store.js, I may have: `const player = writable({name: 'Player A', highScore: 50}); ` I may need a function in the store file: ``` const tick = (latestScore) => { const highScore = player. highScore; if (latestScore > highScore) { //set the player...
AFAIK you'd use `player.subscribe()` and pass it a callback to get notified when the value changed. You could then save that off in a closure variable somewhere to reference from your `tick` function. Aaah - ok. Thanks. I did briefly look at that possibility, and was immediately reminded of John McEnroe remonstrating w...
2019-03-01 03:10: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 ', '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 ...
['store get gets the current value of a 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
Feature
true
false
false
false
0
0
0
false
false
[]
sveltejs/svelte
2,150
sveltejs__svelte-2150
['2149']
5459b71276deaa9d16458aca61b58631fcd6aa10
diff --git a/src/compile/nodes/EventHandler.ts b/src/compile/nodes/EventHandler.ts --- a/src/compile/nodes/EventHandler.ts +++ b/src/compile/nodes/EventHandler.ts @@ -32,7 +32,7 @@ export default class EventHandler extends Node { if (node && node.type === 'VariableDeclaration') { // for `const handleClick = ...
diff --git a/test/runtime/samples/event-handler-destructured/_config.js b/test/runtime/samples/event-handler-destructured/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/event-handler-destructured/_config.js @@ -0,0 +1,15 @@ +export default { + html: ` + <button>clicked: false</button> + `, + ...
Can't use destructured variable declaration for event handler [REPL](https://v3.svelte.technology/repl?version=3.0.0-beta.9&gist=45aaa8708abb38be40448679270a2122). `const handler` works, but `const { handler }` doesn't, because of a bug in some AST traversal somewhere
null
2019-03-02 18:40:31+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['runtime event-handler-destructured ', 'ssr event-handler-destructured', 'runtime event-handler-destructured (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compile/nodes/EventHandler.ts->program->class_declaration:EventHandler->method_definition:constructor"]
sveltejs/svelte
2,161
sveltejs__svelte-2161
['2129']
27ec345f316e48da05ebb7c7673bdd3eeb300319
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -1042,15 +1042,17 @@ export default class Component { } if (node.type === 'AssignmentExpression') { - assignees.add(getObject(node.left).name); + const { name } =...
diff --git a/test/js/samples/dev-warning-missing-data-computed/expected.js b/test/js/samples/dev-warning-missing-data-computed/expected.js --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -56,8 +56,8 @@ function instance($$self, $...
Proposal: Don't re-trigger reactive declarations when their assignees are re-assigned Lumpy title aside, this is basically proposing that if you have `$: foo = bar;` then assignments to `foo` shouldn't retrigger the reactive declaration to be run. The rationale for this was "it was trying to make `foo` read-only — like...
I'm taking a look at this again. Part of this is going to be a revert of #1993, but there's probably going to be more to it than that. @Rich-Harris recalls that under the original implementation, `$: foo[bar] += 1` did not register a dependency on `bar`, which I agree sounds like a bug. He also said that in ``...
2019-03-05 17:36: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 ', '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 ...
['runtime reactive-values-overwrite ', 'js reactive-values-non-topologically-ordered', 'runtime reactive-values-overwrite (with hydration)', 'js reactive-values-non-writable-dependencies', '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
Feature
false
true
false
false
1
0
1
true
false
["src/compile/Component.ts->program->class_declaration:Component->method_definition:extract_reactive_declarations->method_definition:enter"]
sveltejs/svelte
2,168
sveltejs__svelte-2168
['2154']
27ec345f316e48da05ebb7c7673bdd3eeb300319
diff --git a/src/parse/state/mustache.ts b/src/parse/state/mustache.ts --- a/src/parse/state/mustache.ts +++ b/src/parse/state/mustache.ts @@ -316,6 +316,8 @@ export default function mustache(parser: Parser) { } } else if (parser.eat('@html')) { // {@html content} tag + parser.requireWhitespace(); + const e...
diff --git a/test/parser/samples/raw-mustaches-whitespace-error/error.json b/test/parser/samples/raw-mustaches-whitespace-error/error.json new file mode 100644 --- /dev/null +++ b/test/parser/samples/raw-mustaches-whitespace-error/error.json @@ -0,0 +1,10 @@ +{ + "code": "missing-whitespace", + "message": "Expected whi...
Parser doesn't insist on whitespace after @html [REPL](https://v3.svelte.technology/repl?version=3.0.0-beta.10&gist=240ec320582206305808ddbc18d26bdb). This seems bad ```html <script> let string = `this string contains some <strong>HTML!!!</strong>`; </script> <p>{@htmlstring}</p> ```
null
2019-03-06 17:43: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 ', '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 ...
['parse raw-mustaches-whitespace-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
1
0
1
true
false
["src/parse/state/mustache.ts->program->function_declaration:mustache"]
sveltejs/svelte
2,185
sveltejs__svelte-2185
['2184']
ea88317f84adb780075b8a689cf664249b09b42c
diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts --- a/src/compile/render-dom/index.ts +++ b/src/compile/render-dom/index.ts @@ -165,9 +165,14 @@ export default function dom( } if (node.type === 'AssignmentExpression') { - const names = node.left.type === 'MemberExpression'...
diff --git a/test/js/samples/dont-invalidate-this/expected.js b/test/js/samples/dont-invalidate-this/expected.js new file mode 100644 --- /dev/null +++ b/test/js/samples/dont-invalidate-this/expected.js @@ -0,0 +1,42 @@ +/* generated by Svelte vX.Y.Z */ +import { SvelteComponent as SvelteComponent_1, addListener, creat...
Assigning to a property of `this` in a function triggers invalidation of “undefined” [Minimal example:](https://v3.svelte.technology/repl?version=3.0.0-beta.11&gist=1ad69afee5b85aa775178b32e033494a) ```html <script> function make_uppercase() { this.value = this.value.toUpperCase(); } </script> <input on:inpu...
null
2019-03-09 16:23: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 ', '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 ...
['js dont-invalidate-this']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compile/render-dom/index.ts->program->function_declaration:dom->method_definition:leave"]
sveltejs/svelte
2,187
sveltejs__svelte-2187
['2186']
f2a48145a86f91f7e3ad9314e5368d0d2d964ee1
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -26,9 +26,6 @@ type ComponentOptions = { namespace?: string; tag?: string; immutable?: boolean; - props?: string; - props_object?: string; - props_node?: Node; }; // We need to tel...
diff --git a/test/runtime/samples/props-excludes-external/RenderProps.svelte b/test/runtime/samples/props-excludes-external/RenderProps.svelte deleted file mode 100644 --- a/test/runtime/samples/props-excludes-external/RenderProps.svelte +++ /dev/null @@ -1,7 +0,0 @@ -<svelte:options bind:props/> - -<script> - let prop...
Replace `<svelte:options bind:props>` with $$props Very occasionally you need to access all the props that were passed into the component. At the moment that's done like so: ```html <script> let allProps; $: console.log(allProps); </script> <svelte:options bind:props={allProps}/> <h1>Hello {allProps.na...
null
2019-03-09 19:56: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 ', '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 ...
['runtime props (with hydration)', 'vars $$props-logicless, generate: false', 'runtime props ', 'runtime spread-own-props ', 'runtime spread-own-props (with hydration)', 'vars $$props, generate: false', 'ssr props', 'vars $$props-logicless, generate: ssr', 'vars $$props, generate: dom', 'vars $$props, generate: ssr', '...
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Feature
false
true
false
false
10
0
10
false
false
["src/compile/render-dom/index.ts->program->function_declaration:dom", "src/compile/Component.ts->program->class_declaration:Component->method_definition:constructor", "src/compile/Component.ts->program->class_declaration:Component->method_definition:walk_instance_js_pre_template", "src/compile/Component.ts->program->c...
sveltejs/svelte
2,188
sveltejs__svelte-2188
['2180']
06040d3513b326570b2c279ac54b7146708f8c53
diff --git a/src/compile/render-dom/wrappers/EachBlock.ts b/src/compile/render-dom/wrappers/EachBlock.ts --- a/src/compile/render-dom/wrappers/EachBlock.ts +++ b/src/compile/render-dom/wrappers/EachBlock.ts @@ -55,6 +55,8 @@ export default class EachBlockWrapper extends Wrapper { each_block_value: string; get_eac...
diff --git a/test/js/samples/each-block-array-literal/expected.js b/test/js/samples/each-block-array-literal/expected.js new file mode 100644 --- /dev/null +++ b/test/js/samples/each-block-array-literal/expected.js @@ -0,0 +1,84 @@ +/* generated by Svelte vX.Y.Z */ +import { SvelteComponent as SvelteComponent_1, append...
Optimise each blocks with array literals Small thing, but it would be neat to optimise each blocks with array literals, as in [this example](https://v3.svelte.technology/repl?version=3.0.0-beta.11&demo=svg-clock): ```html {#each [1, 2, 3, 4] as offset} <line class='minor' y1='42' y2='45' transform='ro...
This seems like a feature that would require a bunch of restrictions to ensure that the array can never change size. Since restrictions equate directly with more compiler code complexity do you think the tiny speedup in removing a few property accesses justifies the complexity? I'm not against making the compiler sm...
2019-03-09 20:34: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 ', '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 ...
['js each-block-array-literal']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Refactoring
false
false
false
true
4
1
5
false
false
["src/compile/render-dom/wrappers/EachBlock.ts->program->class_declaration:EachBlockWrapper->method_definition:render", "src/compile/render-dom/wrappers/EachBlock.ts->program->class_declaration:EachBlockWrapper->method_definition:renderUnkeyed", "src/compile/render-dom/wrappers/EachBlock.ts->program->class_declaration:...
sveltejs/svelte
2,189
sveltejs__svelte-2189
['2175']
06040d3513b326570b2c279ac54b7146708f8c53
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -157,8 +157,8 @@ export default class Component { variable.reassigned = true; } - this.name = this.getUniqueName(name); this.fragment = new Fragment(this, ast.html); + this.nam...
diff --git a/test/runtime/samples/component-name-deconflicted-globals/Countdown.svelte b/test/runtime/samples/component-name-deconflicted-globals/Countdown.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-name-deconflicted-globals/Countdown.svelte @@ -0,0 +1,10 @@ +<script> + export let co...
Component name isn't deconflicted against assumed globals Contrary to what https://v3.svelte.technology/tutorial/self says, you *can* use `<Folder>` instead of `<svelte:self>`. That's a bug.
null
2019-03-09 21:38: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 ', '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 ...
['runtime component-name-deconflicted-globals (with hydration)', 'runtime component-name-deconflicted-globals ']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
4
0
4
false
false
["src/compile/Component.ts->program->class_declaration:Component->method_definition:add_reference", "src/compile/Component.ts->program->class_declaration:Component->method_definition:constructor", "src/compile/render-dom/wrappers/InlineComponent/index.ts->program->class_declaration:InlineComponentWrapper->method_defini...
sveltejs/svelte
2,190
sveltejs__svelte-2190
['2171', '2171']
06040d3513b326570b2c279ac54b7146708f8c53
diff --git a/src/compile/render-dom/wrappers/Element/Binding.ts b/src/compile/render-dom/wrappers/Element/Binding.ts --- a/src/compile/render-dom/wrappers/Element/Binding.ts +++ b/src/compile/render-dom/wrappers/Element/Binding.ts @@ -213,6 +213,12 @@ function getBindingGroup(renderer: Renderer, value: Node) { return...
diff --git a/test/runtime/samples/binding-store-deep/_config.js b/test/runtime/samples/binding-store-deep/_config.js --- a/test/runtime/samples/binding-store-deep/_config.js +++ b/test/runtime/samples/binding-store-deep/_config.js @@ -1,5 +1,41 @@ export default { - error(assert, err) { - assert.equal(err.message, `C...
store.update(n => mutate(n)) Something came up in Discord that I've also wondered about once or twice: ```js const store = writable({ x: 1 }); store.subscribe(value => { console.log(value.x); }); // logs 1 store.update(obj => ({ obj.x += 1; return obj; }); // does nothing ``` Setting a store to...
I like the idea of making it consistent with Svelte reactive assignments, one less thing to explain or be surprised by. deep bindings would be good Yes, this should happen. I think there should both should be available. Just wondering which one is more performant. In case of listable (array) could .push be handled...
2019-03-09 21:39: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 ', '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 ...
['runtime binding-store-deep (with hydration)', 'store writable does not assume immutable data', 'runtime binding-store-deep ']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Feature
false
true
false
false
2
0
2
false
false
["src/compile/render-dom/wrappers/Element/Binding.ts->program->function_declaration:mutate_store", "src/compile/render-dom/wrappers/Element/Binding.ts->program->function_declaration:getEventHandler"]
sveltejs/svelte
2,191
sveltejs__svelte-2191
['2178']
f2a48145a86f91f7e3ad9314e5368d0d2d964ee1
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -1050,6 +1050,7 @@ export default class Component { this.reactive_declaration_nodes.add(node); const assignees = new Set(); + const assignee_nodes = new Set(); const depe...
diff --git a/test/runtime/samples/reactive-values-self-dependency-b/_config.js b/test/runtime/samples/reactive-values-self-dependency-b/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/reactive-values-self-dependency-b/_config.js @@ -0,0 +1,19 @@ +export default { + html: ` + <p>count: 0</p> + ...
Unexpected token at Reactivity Statements tutorial Open [Reactivity Statements tutorial](https://v3.svelte.technology/tutorial/reactive-statements) Click button **SHOW ME** Error `Unexpected token (Note that you need plugins to import files that are not JavaScript)` **This happens too on local development:...
Ah... this is a consequence of #2161. @Conduitry here's an example of a situation where maybe we should be tracking assignees as dependencies in reactive declarations. This feels like a legitimate use: ```js $: if (count >= 10) { alert(`count is dangerously high!`); count = 9; } ``` ```js $$self.$$.update...
2019-03-10 02:35: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 ', '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 ...
['ssr reactive-values-self-dependency-b', 'runtime reactive-values-self-dependency-b ', 'runtime reactive-values-self-dependency-b (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/compile/Component.ts->program->class_declaration:Component->method_definition:extract_reactive_declarations", "src/compile/Component.ts->program->class_declaration:Component->method_definition:extract_reactive_declarations->method_definition:enter"]
sveltejs/svelte
2,228
sveltejs__svelte-2228
['2173']
863eff9516a965fd73b91b00b79a40e84b31c087
diff --git a/src/compile/Component.ts b/src/compile/Component.ts --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -1034,7 +1034,10 @@ export default class Component { if (!assignee_nodes.has(identifier)) { const { name } = identifier; const owner = scope.findOwner(name); - ...
diff --git a/test/js/samples/reactive-values-non-writable-dependencies/expected.js b/test/js/samples/reactive-values-non-writable-dependencies/expected.js --- a/test/js/samples/reactive-values-non-writable-dependencies/expected.js +++ b/test/js/samples/reactive-values-non-writable-dependencies/expected.js @@ -17,11 +17...
Dependency-less reactive declarations generate invalid code Compiling ```html <script> $: console.log('foo'); </script> ``` generates code containing ```javascript if () { console.log('foo'); } ``` instead of throwing at compile time, which is what I think used to happen.
Okay I see a little more what's going on. There _is_ a currently working "Invalid reactive declaration — must depend on local state" compiler error, but the global `console` is being seen as a dependency of the reactive declaration, which it should not. A potential wrinkle - Consider: ```html <script> let c; $:...
2019-03-15 22:41:02+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime 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 ...
['validate reactive-declaration-no-deps', 'js reactive-values-non-writable-dependencies']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compile/Component.ts->program->class_declaration:Component->method_definition:extract_reactive_declarations->method_definition:enter"]
sveltejs/svelte
2,809
sveltejs__svelte-2809
['2807']
08be15e3aea40a15d1231e18e34143b12b9ea346
diff --git a/src/compiler/parse/state/mustache.ts b/src/compiler/parse/state/mustache.ts --- a/src/compiler/parse/state/mustache.ts +++ b/src/compiler/parse/state/mustache.ts @@ -1,5 +1,6 @@ import read_context from '../read/context'; import read_expression from '../read/expression'; +import { closing_tag_omitted } f...
diff --git a/test/parser/samples/implicitly-closed-li-block/input.svelte b/test/parser/samples/implicitly-closed-li-block/input.svelte new file mode 100644 --- /dev/null +++ b/test/parser/samples/implicitly-closed-li-block/input.svelte @@ -0,0 +1,7 @@ +<ul> + <li>a + {#if true} + <li>b + {/if} + <li>c +</ul> diff --gi...
Implicitly closing tags aren't allowed before closing block Svelte supports implicitly closing tags like `<li>first <li>second`, but it won't allow them to be closed by a mustache closing block: https://svelte.dev/repl/733548506a2b44819e39157bd6a055d3. I don't think this is intuitive and would expect svelte to eithe...
null
2019-05-17 22:33: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 ', '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 ...
['parse implicitly-closed-li-block']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
3
0
3
false
false
["src/compiler/parse/state/mustache.ts->program->function_declaration:mustache", "src/compiler/parse/state/tag.ts->program->function_declaration:tag", "src/compiler/parse/utils/html.ts->program->function_declaration:closing_tag_omitted"]
sveltejs/svelte
2,989
sveltejs__svelte-2989
['2147']
cc3c7fa9f4ab4ce627daf21945d3ec0c2b2c3b63
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 @@ -586,7 +586,7 @@ export default class ElementWrapper exten...
diff --git a/test/js/samples/bind-width-height/expected.js b/test/js/samples/bind-width-height/expected.js --- a/test/js/samples/bind-width-height/expected.js +++ b/test/js/samples/bind-width-height/expected.js @@ -30,7 +30,7 @@ function create_fragment(ctx) { o: noop, d(detaching) { if (detaching) detach(div...
bind:clientWidth doesn't work in sandbox [REPL](https://v3.svelte.technology/repl?version=3.0.0-beta.9&gist=648026c694e2323428e82b60c38829d0). Resizing the viewer window doesn't change anything.
I believe it's repl only issue. Seems like `contentDocument` of the created object element (which used for resize handler) is null if used with `eval`. The same issue exists in v2 ([REPL](https://svelte.technology/repl?version=2.16.1&gist=5c1bec42b3ef51d7574985cc1926d4c5)). update: I've tested the example in a Sappe...
2019-06-09 21:58:58+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime 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-width-height-a11y (with hydration)', 'js bind-width-height', 'runtime binding-width-height-a11y ', '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
Bug Fix
false
false
false
true
4
1
5
false
false
["src/runtime/internal/dom.ts->program->function_declaration:listen", "src/runtime/internal/dom.ts->program->function_declaration:is_crossorigin", "src/runtime/internal/dom.ts->program->function_declaration:add_resize_listener", "src/compiler/compile/render_dom/wrappers/Element/index.ts->program->class_declaration:Elem...
sveltejs/svelte
3,137
sveltejs__svelte-3137
['3135']
80ef6f190de79abba60152e6176c78caf076d087
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 @@ -315,7 +315,14 @@ export default class Stylesheet { leave: (node: Node) => { if (node.type === 'Rule' || node.type === 'A...
diff --git a/test/css/samples/unknown-at-rule-with-following-rules/expected.css b/test/css/samples/unknown-at-rule-with-following-rules/expected.css new file mode 100644 --- /dev/null +++ b/test/css/samples/unknown-at-rule-with-following-rules/expected.css @@ -0,0 +1 @@ +div.svelte-xyz{@apply --funky-div;} \ No newline...
Custom at-rules don't work if not in the last declaration block of a <style> tag [REPL](https://svelte.dev/repl/6dd5a9e4a7d14a949bfb0850339d8a4b?version=3.6.1) Custom at-rules, such as `@apply`, aren't parsed properly (and cause a compile-time error!) unless they are in the last declaration block of the component's ...
This might be something else that #2995 aims to take care of.
2019-06-29 23:03: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
['css omit-scoping-attribute-attribute-selector-equals-case-insensitive', 'css combinator-child', 'css empty-rule-dev', 'css supports-query', 'css omit-scoping-attribute-descendant-global-inner-class', 'css omit-scoping-attribute-whitespace', 'css attribute-selector-only-name', 'css empty-rule', 'css css-vars', 'css gl...
['css unknown-at-rule-with-following-rules']
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/Stylesheet.ts->program->class_declaration:Stylesheet->method_definition:constructor"]
sveltejs/svelte
3,141
sveltejs__svelte-3141
['1705']
220515b60572cae18e85ef19e63bd2ca04fd8806
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 @@ -61,7 +61,10 @@ export default class Selector { let i = block.selectors.length; while (i--) { const selector = block.selectors[i]...
diff --git a/test/css/samples/not-selector/expected.css b/test/css/samples/not-selector/expected.css new file mode 100644 --- /dev/null +++ b/test/css/samples/not-selector/expected.css @@ -0,0 +1 @@ +.svelte-xyz:not(.foo){color:red} \ No newline at end of file diff --git a/test/css/samples/not-selector/input.svelte b/t...
:not(...) styles are broken [REPL](https://svelte.technology/repl?version=2.13.1&gist=c80e2cda5f07897ad9eaada7df570cc0). The encapsulator should treat `:not(selector)` as `*:not(selector)`, but it doesn't.
I don't think it is a svelte bug. This is the normal behaviour in CSS. See this codepen : https://codepen.io/thollander/pen/JzJQKO?editors=1100 The color is inherited by default. https://www.w3schools.com/cssref/pr_text_color.asp So it takes the color of the body property which validates the rule `:not(p)` H...
2019-06-30 21:42: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
['css omit-scoping-attribute-attribute-selector-equals-case-insensitive', 'css combinator-child', 'css empty-rule-dev', 'css supports-query', 'css omit-scoping-attribute-descendant-global-inner-class', 'css omit-scoping-attribute-whitespace', 'css attribute-selector-only-name', 'css empty-rule', 'css css-vars', 'css gl...
['css not-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
1
0
1
true
false
["src/compiler/compile/css/Selector.ts->program->class_declaration:Selector->method_definition:transform->function_declaration:encapsulate_block"]
sveltejs/svelte
3,142
sveltejs__svelte-3142
['1496']
220515b60572cae18e85ef19e63bd2ca04fd8806
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 @@ -137,6 +137,7 @@ export default class AwaitBlockWrapper extends Wrappe...
diff --git a/test/runtime/index.js b/test/runtime/index.js --- a/test/runtime/index.js +++ b/test/runtime/index.js @@ -21,6 +21,11 @@ let compile = null; const sveltePath = process.cwd().split('\\').join('/'); +let unhandled_rejection = false; +process.on('unhandledRejection', err => { + unhandled_rejection = err;...
running {#await} inside an {#if} [REPL](https://svelte.technology/repl?version=2.6.5&gist=864c4b0251414988e23730b23147ce71) If we have a `{#await}` block running inside a truthy `{#if}` and, for some reason, the `{#if}` evaluates to false while the promise is still running, we get an error: ``` Uncaught (in prom...
I think it makes sense to work on this right after or alongside #1514, because that's going to touch the await block code anyway. I just have yet to find a way of dealing with that issue that I'm happy with. Using **svelte": "2.13.2"** I'm facing same issue: ``` {#if $someStoreData} <componentA /> {:else} ...
2019-07-01 00:52: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 ', '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 ...
['runtime await-in-removed-if (with hydration)', 'runtime await-in-removed-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:AwaitBlockWrapper->method_definition:render"]
sveltejs/svelte
3,148
sveltejs__svelte-3148
['2377']
b99ee7d5d177f4fb42b5821d63993248833ee48a
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 @@ -94,7 +94,7 @@ export default function dom( const body = []; const not_equal = component.component_options.immutable ? `...
diff --git a/test/js/samples/capture-inject-dev-only/_config.js b/test/js/samples/capture-inject-dev-only/_config.js new file mode 100644 --- /dev/null +++ b/test/js/samples/capture-inject-dev-only/_config.js @@ -0,0 +1,5 @@ +export default { + options: { + dev: false + } +}; \ No newline at end of file diff --git a/t...
Hooks for granular HMR support Follow up to recent conversation on discord regarding v3 support for HMR. Let me list out the steps we need for a successful hot reload, and then maybe we can discuss if the core needs to change, or whether we can just monkey-patch stuff. I'm going to gloss over the component resolu...
Thanks, this is very useful. The `component.$$.ctx` stuff is subject to change (see e.g. #2318 and #1922), so I think we should introduce new methods that are explicitly designed for this purpose — e.g. `component.$capture_state()` and `component.$inject_state(captured_state)`. `$inject_state` would work basically the ...
2019-07-01 15:39: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 ', '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 ...
['js debug-foo-bar-baz-things', 'js debug-empty', 'js dev-warning-missing-data-computed', 'js debug-foo', '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
Feature
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/index.ts->program->function_declaration:dom"]
sveltejs/svelte
3,150
sveltejs__svelte-3150
['2714']
f341befacb92d821424889dfefbdccedc881bfe5
diff --git a/src/runtime/internal/Component.ts b/src/runtime/internal/Component.ts --- a/src/runtime/internal/Component.ts +++ b/src/runtime/internal/Component.ts @@ -11,11 +11,11 @@ interface T$$ { bound: any; update: () => void; callbacks: any; - after_render: any[]; + after_update: any[]; props: any; fragm...
diff --git a/test/runtime/samples/lifecycle-render-order-for-children/Item.svelte b/test/runtime/samples/lifecycle-render-order-for-children/Item.svelte new file mode 100755 --- /dev/null +++ b/test/runtime/samples/lifecycle-render-order-for-children/Item.svelte @@ -0,0 +1,29 @@ +<script> + import { onMount, beforeUpda...
Provide non-decoded text to `parse` consumers Currently, `parse` from `svelte/compiler` decodes HTML entities (such as `&amp;` or `&dot;`). This causes tools like [prettier-plugin-svelte] that use the AST to generate source text to write decoded entities back to the template. It would be nice if either this decoding ha...
null
2019-07-02 01:52: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 ', '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 ...
['runtime lifecycle-render-order-for-children ', 'runtime lifecycle-render-order (with hydration)', 'runtime lifecycle-render-order ', 'runtime lifecycle-render-order-for-children (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
Refactoring
false
true
false
false
7
0
7
false
false
["src/runtime/internal/Component.ts->program->function_declaration:init", "src/runtime/internal/ssr.ts->program->function_declaration:create_ssr_component->function_declaration:$$render", "src/runtime/internal/Component.ts->program->function_declaration:mount_component", "src/runtime/internal/scheduler.ts->program->fun...
sveltejs/svelte
3,151
sveltejs__svelte-3151
['2906']
f341befacb92d821424889dfefbdccedc881bfe5
diff --git a/src/compiler/compile/nodes/shared/Expression.ts b/src/compiler/compile/nodes/shared/Expression.ts --- a/src/compiler/compile/nodes/shared/Expression.ts +++ b/src/compiler/compile/nodes/shared/Expression.ts @@ -442,6 +442,10 @@ export default class Expression { `); } + if (parent && paren...
diff --git a/test/runtime/samples/shorthand-method-in-template/Foo.svelte b/test/runtime/samples/shorthand-method-in-template/Foo.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/shorthand-method-in-template/Foo.svelte @@ -0,0 +1,5 @@ +<script> + export let bar; +</script> + +{bar.answer()} \ No new...
Shorthand methods in object literals disappear This works fine: ```html <script> import Greeter from './Greeter.svelte'; const object = { getName() { return 'foo'; } }; </script> <Greeter thing={object} /> ``` This breaks: ```html <script> import Greeter from './Greeter.svelte'; </scrip...
"Unexpected token (Note that you need plugins to import files that are not JavaScript)" is an error from Rollup actually, which generally indicates that the Svelte compiler is outputting invalid js, in this case `{ getNamectx.func }`.
2019-07-02 02:42: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 ', '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 ...
['runtime shorthand-method-in-template (with hydration)', 'runtime shorthand-method-in-template ']
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/shared/Expression.ts->program->class_declaration:Expression->method_definition:render->method_definition:leave"]
sveltejs/svelte
3,158
sveltejs__svelte-3158
['3038']
9883a50bf99a017b89f911431378040cf0869f96
diff --git a/src/compiler/compile/nodes/shared/Expression.ts b/src/compiler/compile/nodes/shared/Expression.ts --- a/src/compiler/compile/nodes/shared/Expression.ts +++ b/src/compiler/compile/nodes/shared/Expression.ts @@ -270,7 +270,7 @@ export default class Expression { }); } else { dependencie...
diff --git a/test/runtime/samples/function-expression-inline/_config.js b/test/runtime/samples/function-expression-inline/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/function-expression-inline/_config.js @@ -0,0 +1,22 @@ +export default { + html: ` + <button>click me</button> + <p>1</p> +...
"Unexpected token" when expression with function involving return statement is assigned to non-local variable I got `"Unexpected token (Note that you need plugins to import files that are not JavaScript)"` when I did something like this: ```html <button on:click={event => { list = list.map(item => { const n...
Found another requirement for reproducing this error, the return statement must be terminated with a semicolon (wtf?) [REPL](https://svelte.dev/repl/dc50f766a64e40098190e915ed450d3b?version=3.5.3) This issue is probably related as well, doesn't result in a parse error, but there's also some weirdness with how the $$...
2019-07-02 20:27: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 ', '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 ...
['runtime function-expression-inline (with hydration)', 'runtime function-expression-inline ']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
2
0
2
false
false
["src/compiler/compile/nodes/shared/Expression.ts->program->class_declaration:Expression->method_definition:render->method_definition:enter", "src/compiler/compile/nodes/shared/Expression.ts->program->class_declaration:Expression->method_definition:render->method_definition:leave"]
sveltejs/svelte
3,170
sveltejs__svelte-3170
['3153']
943c04834a4af29a51aa861bc71c3a4383f15e41
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 @@ -114,9 +114,15 @@ export function create_ssr_component(fn) { }; } +/** + * Get the current value from a store by subscribing and immediately unsubscribing. + * @param store ...
diff --git a/test/store/index.ts b/test/store/index.ts --- a/test/store/index.ts +++ b/test/store/index.ts @@ -329,5 +329,18 @@ describe('store', () => { const store = readable(42, () => { }); assert.equal(get(store), 42); }); + + it('works with RxJS-style observables', () => { + const observable = { + ...
`get_store_value` doesn't account for RxJS observables Somewhat adjacent to https://github.com/sveltejs/sapper/issues/781 but I think there's other stuff going on there too. The support we added for RxJS observables (i.e., allowing for the `.subscribe()` method to also return an _object_ with an `.unsubscribe()` met...
Here is a minimal repl that demonstrates the bug I was discussing in sveltejs/sapper#781. https://svelte.dev/repl/8bf28363bde34ecb8fa4e9b91a9e397a?version=3.6.3 (I had misdiagnosed the problem earlier and it didn't deal with sapper, so I have closed it)
2019-07-03 19:17: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 ', '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 ...
['store get 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
3
0
3
false
false
["src/runtime/store/index.ts->program->function_declaration:derived", "src/runtime/internal/ssr.ts->program->function_declaration:get_store_value", "src/runtime/store/index.ts->program->function_declaration:get"]
sveltejs/svelte
3,171
sveltejs__svelte-3171
['3140']
943c04834a4af29a51aa861bc71c3a4383f15e41
diff --git a/src/compiler/compile/nodes/shared/Expression.ts b/src/compiler/compile/nodes/shared/Expression.ts --- a/src/compiler/compile/nodes/shared/Expression.ts +++ b/src/compiler/compile/nodes/shared/Expression.ts @@ -138,7 +138,8 @@ export default class Expression { } if (template_scope.is_let(name)...
diff --git a/test/runtime/samples/component-slot-let-in-binding/Nested.svelte b/test/runtime/samples/component-slot-let-in-binding/Nested.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-let-in-binding/Nested.svelte @@ -0,0 +1,9 @@ +<script> + export let items; +</script> + +<div> + {...
Bindings don't receive context from let variables Via [this Stack Overflow question](https://stackoverflow.com/questions/56817063/how-to-bind-variable-declared-with-svelte-let-directive). Using a `let` variable in a binding doesn't work — the binding function isn't passed the relevant context, it seems: https://svel...
null
2019-07-03 23:36:13+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['runtime component-slot-let-in-binding (with hydration)', 'runtime component-slot-let-in-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
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/nodes/shared/Expression.ts->program->class_declaration:Expression->method_definition:constructor->method_definition:enter"]
sveltejs/svelte
3,172
sveltejs__svelte-3172
['3113']
7e01c3c4f82d1327ed2406a47987a1fbcb06059e
diff --git a/src/compiler/compile/render_dom/wrappers/EachBlock.ts b/src/compiler/compile/render_dom/wrappers/EachBlock.ts --- a/src/compiler/compile/render_dom/wrappers/EachBlock.ts +++ b/src/compiler/compile/render_dom/wrappers/EachBlock.ts @@ -493,7 +493,7 @@ export default class EachBlockWrapper extends Wrapper { ...
diff --git a/test/js/samples/transition-repeated-outro/expected.js b/test/js/samples/transition-repeated-outro/expected.js --- a/test/js/samples/transition-repeated-outro/expected.js +++ b/test/js/samples/transition-repeated-outro/expected.js @@ -81,7 +81,7 @@ function create_fragment(ctx) { } } else if (if_bl...
From 3.6.0: "TypeError: Cannot read property 'block' of null" I'm using it with `svelte-apollo` but I cannot create now reproduction on codesandbox. ```log Uncaught (in promise) TypeError: Cannot read property 'block' of null at Object.destroy [as d] (PlayersPage.svelte:14) at destroy_component (index.mjs...
I can confirm this. Downgrading to 3.5.4 fixes the issue. I am using page.js for routing and 3.6.0 breaks it. We'll need a repro to debug this. It doesn't have to be on codesandbox, it can be a git repo. Is this still present on the latest version? I cannot create gist now. The problem is still on `3.6.2` (I try eve...
2019-07-04 00:20: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 ', '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 ...
['runtime await-in-dynamic-component ', 'js transition-repeated-outro', 'runtime await-in-dynamic-component (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
7
0
7
false
false
["src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts->program->class_declaration:InlineComponentWrapper->method_definition:render", "src/compiler/compile/render_dom/wrappers/IfBlock.ts->program->class_declaration:IfBlockWrapper->method_definition:render_simple", "src/runtime/internal/await_block.ts->prog...
sveltejs/svelte
3,209
sveltejs__svelte-3209
['2086']
f2d25828d544d61d4f094db2571f4cf6690c432e
diff --git a/src/runtime/internal/transitions.ts b/src/runtime/internal/transitions.ts --- a/src/runtime/internal/transitions.ts +++ b/src/runtime/internal/transitions.ts @@ -28,15 +28,17 @@ let outros; export function group_outros() { outros = { - remaining: 0, - callbacks: [] + r: 0, // remaining outros +...
diff --git a/test/runtime/samples/each-block-keyed-nested/Child.svelte b/test/runtime/samples/each-block-keyed-nested/Child.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/each-block-keyed-nested/Child.svelte @@ -0,0 +1,5 @@ +<script> + export let id; +</script> + +{id} \ No newline at end of file ...
Uncaught (in promise) TypeError: Cannot read property 'removeChild' of null I couldn't reproduce the error in the repl and I also can't post the data since it is confidential. I'll try to post as much information as possible though. This is the component: ``` {#each schueler as s (s.ID)} {#each s.abschnitt...
A very simple and well working workaround (not even a speed penalty so far) seems to be a `destroy()` and recreation of the component. Should have tried that earlier than setting the data. I have also encountered this, but cannot reproduce at the moment. It went usually like this: 1. Visit `/items` 2. Click link to...
2019-07-09 18:06: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 ', '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 ...
['runtime each-block-keyed-nested (with hydration)', 'runtime each-block-keyed-nested ']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
6
0
6
false
false
["src/runtime/internal/transitions.ts->program->function_declaration:group_outros", "src/runtime/internal/transitions.ts->program->function_declaration:create_out_transition->function_declaration:go", "src/runtime/internal/transitions.ts->program->function_declaration:create_out_transition", "src/runtime/internal/trans...
sveltejs/svelte
3,229
sveltejs__svelte-3229
['3228']
2b79a2269d57ba8b63a8422937e3e016a03c43bb
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 @@ -217,6 +217,11 @@ class Atrule { if (type === 'Identifier') { if (name.startsWith('-global-')) { code.remove(start, ...
diff --git a/test/css/samples/global-keyframes-with-no-elements/expected.css b/test/css/samples/global-keyframes-with-no-elements/expected.css new file mode 100644 --- /dev/null +++ b/test/css/samples/global-keyframes-with-no-elements/expected.css @@ -0,0 +1 @@ +@keyframes why{0%{color:red}100%{color:blue}} \ No newlin...
Global keyframes with no elements not rendered properly **Reproduce**: https://svelte.dev/repl/fa0c4efb2ae043d78a8d9ed97d1badc1?version=3.6.7 **Issue**: keyframe selectors are eaten
null
2019-07-12 10:41: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 ', '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 ...
['css global-keyframes-with-no-elements']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/css/Stylesheet.ts->program->class_declaration:Atrule->method_definition:transform"]
sveltejs/svelte
3,294
sveltejs__svelte-3294
['3289']
b99ee7d5d177f4fb42b5821d63993248833ee48a
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 @@ -185,7 +185,7 @@ export de...
diff --git a/test/runtime/samples/spread-reuse-levels/Nested.svelte b/test/runtime/samples/spread-reuse-levels/Nested.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/spread-reuse-levels/Nested.svelte @@ -0,0 +1,21 @@ +<script> + import { beforeUpdate } from 'svelte'; + + export let a, b, c; + + let...
Spread props cause unnecessary changes **Describe the bug** Inline expressions are re-evaluated when setting spread props on a component. **To Reproduce** https://svelte.dev/repl/38ab6eb9233a4d8c97e67d576e063109?version=3.6.8 **Expected behavior** Waggling the slider should only cause `a` to show up as h...
Looking at that code again, I'm wondering if there's a good reason not to do this instead: ```js if (changed.x || changed.a || changed.b) { nested1.$set(get_spread_update(nested1_spread_levels, [ (changed.x) && ctx.x, (changed.a) && { a: ctx.a }, (changed.b) && { b: ctx.b }, nested1_spread_le...
2019-07-26 22:35: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 ', '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 ...
['runtime spread-reuse-levels ', 'runtime spread-reuse-levels (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
3,295
sveltejs__svelte-3295
['3286']
b99ee7d5d177f4fb42b5821d63993248833ee48a
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 @@ -359,15 +359,11 @@ export default function dom( component.reactive_declarations .forEach(d => { - let uses_props; ...
diff --git a/test/runtime/samples/props-reactive-b/_config.js b/test/runtime/samples/props-reactive-b/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/props-reactive-b/_config.js @@ -0,0 +1,30 @@ +export default { + props: { + a: 1, + b: 2 + }, + + html: ` + <p>a: 1</p> + <p>b: 2</p> + <p>c...
Reactive declarations with $$props don't refire if they reference other values **Describe the bug** Reactive declarations that refer to `$$props` should fire whenever any prop changes. Currently, this only holds true if the declaration doesn't reference anything else **To Reproduce** https://svelte.dev/repl/b5...
null
2019-07-26 22:49: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 ', '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 ...
['runtime props-reactive-b ', 'runtime props-reactive-b (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/index.ts->program->function_declaration:dom"]
sveltejs/svelte
3,305
sveltejs__svelte-3305
['3226']
b99ee7d5d177f4fb42b5821d63993248833ee48a
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 @@ -26,7 +26,7 @@ const events = [ event_names: ['input'],...
diff --git a/test/js/samples/input-files/expected.js b/test/js/samples/input-files/expected.js --- a/test/js/samples/input-files/expected.js +++ b/test/js/samples/input-files/expected.js @@ -19,7 +19,7 @@ function create_fragment(ctx) { input = element("input"); attr(input, "type", "file"); input.multiple =...
bind:files doesn't work on safari. But works in chrome <!-- 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://sv...
can confirm. receiving events in chrome and firefox. You can use change event. https://svelte.dev/repl/f4e2ed04dfda4b2f82ee870fafcd997e?version=3.6.7 ``` <script> let name = 'world'; let files = [] $: { console.log(files) } const changed = (event)=>{ console.log('changed', event) files = ...
2019-07-28 17:16:31+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['js input-files']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
true
false
false
false
0
0
0
false
false
[]
sveltejs/svelte
3,314
sveltejs__svelte-3314
['3312']
dbf503b9e1ed2f4cdebb134b8f2125f67d3d8b86
diff --git a/src/compiler/compile/render_ssr/handlers/InlineComponent.ts b/src/compiler/compile/render_ssr/handlers/InlineComponent.ts --- a/src/compiler/compile/render_ssr/handlers/InlineComponent.ts +++ b/src/compiler/compile/render_ssr/handlers/InlineComponent.ts @@ -58,7 +58,7 @@ export default function(node: Inlin...
diff --git a/test/runtime/samples/prop-quoted/Nested.svelte b/test/runtime/samples/prop-quoted/Nested.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/prop-quoted/Nested.svelte @@ -0,0 +1 @@ +{$$props['x-y-z']} \ No newline at end of file diff --git a/test/runtime/samples/prop-quoted/_config.js b/te...
Illegal property names aren't quoted for SSR **Describe the bug** A component can have a property like `<Foo x-y-z={42}/>`, and it will ordinarily be quoted by the compiler: ```js var foo = new Foo({ props: { "x-y-z": 42 } }); ``` In SSR mode, we get this instead: ```js return `${validate_component(Foo, ...
null
2019-07-30 18:33: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 ', '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 ...
['ssr prop-quoted']
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
3,315
sveltejs__svelte-3315
['3304']
981f30d3e9848994f4eac6666fc4a30701c0be09
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 @@ -267,9 +267,9 @@ export default function dom( return `$$subscribe_${name}()`; } - const subscribe = component.hel...
diff --git a/test/runtime/samples/store-resubscribe-observable/_config.js b/test/runtime/samples/store-resubscribe-observable/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/store-resubscribe-observable/_config.js @@ -0,0 +1,3 @@ +export default { + html: `42`, +}; diff --git a/test/runtime/sam...
Observable-as-store error on reassignment **Describe the bug** Reassigning an observable-as-store variable results in an error `$$unsubscribe_NAMEHERE is not a function`. It appears that currently observables can be used only in certain undocumented restricted ways, perhaps only as long as such variables are never r...
[Here](https://github.com/sveltejs/svelte/blob/b3ef4e64beb7de62eeb16fb40281c50a0aa21dea/src/compiler/compile/render_dom/index.ts#L393) when we're setting the unsubscription function to be called later, we're not accounting for the fact that the return value of `.subscribe()` might be an object with a `.unsubscribe()` m...
2019-07-30 21:22:27+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime 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 ...
['runtime store-resubscribe-observable (with hydration)', 'runtime store-resubscribe-observable ']
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/utils.ts->program->function_declaration:get_store_value", "src/runtime/internal/utils.ts->program->function_declaration:component_subscribe", "src/runtime/internal/ssr.ts->program->function_declaration:get_store_value", "src/compiler/compile/render_dom/index.ts->program->function_declaration:dom"...
sveltejs/svelte
3,329
sveltejs__svelte-3329
['3285']
4e004fdfa32d505fd17933a664a5407def076f2f
diff --git a/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts b/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts --- a/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts +++ b/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts @@ -2,7 +2,6 @@ import Renderer from '../Renderer'; impo...
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 @@ -1,11 +1,11 @@ /* generated by Svelte vX.Y.Z */ import { + HtmlTag, Svelte...
Slotted {@html} content duplicated on each re-render **Describe the bug** 1. If a component has a `<slot/>` 2. ..and in that slot we render something using `{@html}` 3. ...and then we render these components in `{#each}` and somehow cause re-renders, like changing sort order → the contents of `{@html}` gets dupli...
Simpler repro: https://svelte.dev/repl/71495c9cb4ba4f8d9e70059c61f4dbc7?version=3.6.8 I just noticed this has some similarity to a (unfixed) bug I reported in Svelte v2: https://github.com/sveltejs/svelte/issues/1712
2019-08-02 11:53: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 ', '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 ...
['runtime each-block-keyed-html ', 'runtime raw-mustaches ', 'runtime raw-mustache-before-element (with hydration)', 'runtime each-block-keyed-html (with hydration)', 'runtime raw-mustaches (with hydration)', 'js each-block-changed-check', 'runtime raw-mustache-before-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
11
1
12
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/runtime/internal/dom.ts->program->function_declaration:detach_between", "src/runtime/internal/dom.ts->program->class_declaration:HtmlTag->...
sveltejs/svelte
3,332
sveltejs__svelte-3332
['3331']
981f30d3e9848994f4eac6666fc4a30701c0be09
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 @@ -451,11 +451,12 @@ export default class Element extends Node { if (this.name === 'input') { const type = attribute_map.get('type'...
diff --git a/test/validator/samples/a11y-alt-text/input.svelte b/test/validator/samples/a11y-alt-text/input.svelte --- a/test/validator/samples/a11y-alt-text/input.svelte +++ b/test/validator/samples/a11y-alt-text/input.svelte @@ -6,4 +6,6 @@ <object></object> -<input type='image'> \ No newline at end of file +<in...
Not accepting PayPal input image statement with an alt message. **Describe the bug** I have a component that uses an input type image and it has an alt message also. But the svelte compiler is constantly warning that it needs an alt message. **Logs** ``` (!) Plugin svelte: A11y: <input type="image"> element sho...
This is reproducible in the REPL. ```svelte <input type="image" alt="PayPal: A safe way to make donations." src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit"> ``` Svelte returns an incorrect warning about this element needing `alt`, `aria-label`, or `aria-labelledby`. ...
2019-08-02 16:24:35+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['validate a11y-alt-text']
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_attributes"]
sveltejs/svelte
3,333
sveltejs__svelte-3333
['3179']
981f30d3e9848994f4eac6666fc4a30701c0be09
diff --git a/src/compiler/compile/nodes/shared/Expression.ts b/src/compiler/compile/nodes/shared/Expression.ts --- a/src/compiler/compile/nodes/shared/Expression.ts +++ b/src/compiler/compile/nodes/shared/Expression.ts @@ -363,7 +363,7 @@ export default class Expression { } const fn = deindent` - fun...
diff --git a/test/runtime/samples/event-handler-async/_config.js b/test/runtime/samples/event-handler-async/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/event-handler-async/_config.js @@ -0,0 +1,5 @@ +export default { + html: ` + <button>nothing</button> + `, +}; diff --git a/test/runtime/s...
Support async arrow function for inline event handlers It would be nice to have `async` inline event handlers without writing the full function in the `<script>` tag like: ``` <button on:click={async () => {await services.saveData()}}> Save </button> ``` Currently, the compiler raises the following compil...
The compiler does not appear to be throwing an error, but the generated code is invalid, and the event handler is not labeled as `async`. This is a bug, but can be worked around for now by defining the click handler in the `<script>` block. ```diff diff --git a/src/compiler/compile/nodes/shared/Expression.ts b/src/com...
2019-08-02 20:48:54+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['runtime event-handler-async ', 'runtime event-handler-async (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
1
0
1
true
false
["src/compiler/compile/nodes/shared/Expression.ts->program->class_declaration:Expression->method_definition:render->method_definition:leave"]
sveltejs/svelte
3,335
sveltejs__svelte-3335
['3281']
981f30d3e9848994f4eac6666fc4a30701c0be09
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 @@ -219,6 +219,8 @@ function attribute_matches(node: Node, name: string, expected_value: string, ope const spread = node.attributes.find(attr =...
diff --git a/test/css/samples/attribute-selector-bind/expected.css b/test/css/samples/attribute-selector-bind/expected.css new file mode 100644 --- /dev/null +++ b/test/css/samples/attribute-selector-bind/expected.css @@ -0,0 +1 @@ +details[open].svelte-xyz{color:red} \ No newline at end of file diff --git a/test/css/s...
`details bind:open` should count as `[open]` for styling ```svelte <script> let open = false; </script> <details bind:open>Hello</details> <style> details[open] { color: red; } </style> ``` `details[open]` is getting removed because the compiler doesn't think that `<details bind:open>` indicates a...
I had assumed there was some precedent for handling this with other bindings, but thinking about it more, I'm not sure what bindings those would be. We might just need a weird one-off check for this when determining whether an element can match a selector. ```diff diff --git a/src/compiler/compile/css/Selector.ts b/sr...
2019-08-02 23:33:36+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['css attribute-selector-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/css/Selector.ts->program->function_declaration:attribute_matches"]
sveltejs/svelte
3,336
sveltejs__svelte-3336
['3274']
981f30d3e9848994f4eac6666fc4a30701c0be09
diff --git a/src/compiler/compile/nodes/EachBlock.ts b/src/compiler/compile/nodes/EachBlock.ts --- a/src/compiler/compile/nodes/EachBlock.ts +++ b/src/compiler/compile/nodes/EachBlock.ts @@ -83,16 +83,16 @@ export default class EachBlock extends AbstractBlock { this.scope.add(context.key.name, this.expression.depen...
diff --git a/test/validator/samples/undefined-value/input.svelte b/test/validator/samples/undefined-value/input.svelte --- a/test/validator/samples/undefined-value/input.svelte +++ b/test/validator/samples/undefined-value/input.svelte @@ -1,6 +1,6 @@ -<script> - // script block prevents auto-declaration -</script> - <...
References to each index in keying expression seen as undeclared From https://github.com/sveltejs/eslint-plugin-svelte3/issues/37 Something like ```svelte {#each foo as bar, i (i)}hey{/each} ``` produces an erroneous warning that `i` is not defined. The key seems to be created correctly from the each block's...
My first stab at a solution for this was to simply add the EachBlock's index to its scope before creating the Expression for its key: ```diff diff --git a/src/compiler/compile/nodes/EachBlock.ts b/src/compiler/compile/nodes/EachBlock.ts index adaa46b8..12e6cccb 100644 --- a/src/compiler/compile/nodes/EachBlock.ts...
2019-08-03 04:31:12+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['validate undefined-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/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:constructor"]
sveltejs/svelte
3,342
sveltejs__svelte-3342
['3341']
fb37b062866d271fcb4652fffcaf20fd72a46c40
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 @@ -240,7 +240,7 @@ export default class Attr...
diff --git a/test/runtime/samples/innerhtml-interpolated-literal/_config.js b/test/runtime/samples/innerhtml-interpolated-literal/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/innerhtml-interpolated-literal/_config.js @@ -0,0 +1,7 @@ +export default { + html: ` + <div> + <span class="a/42"...
Commas in generated HTML **Describe the bug** When portions of markup are turned into HTML, attributes with interpolated literals (insofar as that's not an oxymoron) contain unwanted commas **To Reproduce** ```svelte <div> <span class="a/{42}"/> </div> ``` This needs to be compiled in production mode,...
null
2019-08-03 17:23:27+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime 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 ...
['runtime innerhtml-interpolated-literal ', 'runtime innerhtml-interpolated-literal (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/Attribute.ts->program->class_declaration:AttributeWrapper->method_definition:stringify"]
sveltejs/svelte
3,346
sveltejs__svelte-3346
['3337']
d6ca507240c5ae3be258ed92a2afcff4f6a5731c
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 @@ -70,11 +70,6 @@ export default class Attri...
diff --git a/test/js/samples/bind-open/expected.js b/test/js/samples/bind-open/expected.js --- a/test/js/samples/bind-open/expected.js +++ b/test/js/samples/bind-open/expected.js @@ -66,4 +66,4 @@ class Component extends SvelteComponent { } } -export default Component; +export default Component; \ No newline at en...
`dataset` optimization does not respect null indicating to remove the attribute **Describe the bug** `data-foo={bar}` should, like other attribute settings, remove the attribute when setting it to a value of `null` or `undefined`. The optimization (used unless `legacy` is enabled) of instead assigning to the `dataset`...
I'm not sure the extent that #858 was intended as a speed optimization vs a size optimization. The simplest solution would be to remove that optimization (to bring this in line with the other recent move to do almost everything with attributes instead of properties), but I don't know what that would lose. If it was int...
2019-08-03 17:57:12+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['js do-use-dataset']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
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
3,348
sveltejs__svelte-3348
['3272']
4e004fdfa32d505fd17933a664a5407def076f2f
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 @@ -662,7 +662,7 @@ export default class Component { this.node_for_declaration.set(name, node); }); - globals.forEach((_node, name) => { + globals...
diff --git a/test/validator/samples/dollar-dollar-global-in-markup/errors.json b/test/validator/samples/dollar-dollar-global-in-markup/errors.json new file mode 100644 --- /dev/null +++ b/test/validator/samples/dollar-dollar-global-in-markup/errors.json @@ -0,0 +1,15 @@ +[{ + "code": "illegal-global", + "message": "$$b...
Variable called `$` allowed by compiler and produces invalid output ```svelte <script> $; </script> ``` Variables called simply `$` are currently allowed and are assumed to be subscriptions to a variable with the empty string as the name, which results in syntactically incorrect output. The simplest solution wo...
null
2019-08-04 01:20:13+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['validate dollar-global-in-markup', 'validate dollar-global-in-script', 'validate dollar-dollar-global-in-script', 'validate dollar-dollar-global-in-markup']
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:walk_instance_js_pre_template", "src/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:warn_if_undefined"]
sveltejs/svelte
3,350
sveltejs__svelte-3350
['2711']
873a561e83f1910c1947786b1c770a5a73a3b7f8
diff --git a/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts b/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts --- a/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts +++ b/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts @@ -47,10 +47,10 @@ export default class RawMustacheTagWr...
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 @@ -55,7 +55,7 @@ function create_each_block(ctx) { append(span, t4); app...
unexpected behavior using unwrapped html expression as component output https://svelte.dev/repl/98745830909e4c88979965fe00a8ba3a?version=3.2.1 ### Repro Steps: 1. change the text in any field to modify the alphabetical order 2. change the focus Repros in Chrome, FF, Safari. Svelte 3.2.1 Doesn't repro if the ...
Hi @CreaturesInUnitards! Very interesting. [It happens if the HTML string is in the topmost component as well](https://svelte.dev/repl/21425fc5339a4f37b1f4404f9d536430?version=3.2.1). If you as an experiment remove the each block key and change the ordering, the HTML isn't duplicated. Here is a minimal example that sho...
2019-08-04 13:49:22+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['runtime each-block-keyed-html-b ', 'js each-block-changed-check', 'runtime each-block-keyed-html-b (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/RawMustacheTag.ts->program->class_declaration:RawMustacheTagWrapper->method_definition:render", "src/runtime/internal/dom.ts->program->class_declaration:HtmlTag->method_definition:m"]
sveltejs/svelte
3,355
sveltejs__svelte-3355
['3354']
d61387d933ee28805806adac9aa082b97180c2b6
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 @@ -72,7 +72,7 @@ export default class Component { stats: Stats; warnings: Warning[]; ignores: Set<string>; - ignore_stack: Set<string>[] = []; + ignor...
diff --git a/test/runtime/samples/component-slot-let-f/A.svelte b/test/runtime/samples/component-slot-let-f/A.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-let-f/A.svelte @@ -0,0 +1,9 @@ +<script> + import B from './B.svelte'; + export let x; +</script> + +<B {x} let:reflected> + <...
slot value not reactive when nested (regression) **Describe the bug** It seems a value from a " let:" on a component with slots doesn't trigger an update when used as a prop on a slot... eg ```html <WithColourPicker let:colour> <slot titlecolour={colour} /> </WithColourPicker> ``` changes that "WithColou...
null
2019-08-05 12:40: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 ', '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 ...
['runtime component-slot-let-f ', 'runtime component-slot-let-f (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
1
1
2
false
false
["src/compiler/compile/render_dom/wrappers/Slot.ts->program->class_declaration:SlotWrapper->method_definition:render", "src/compiler/compile/Component.ts->program->class_declaration:Component"]
sveltejs/svelte
3,380
sveltejs__svelte-3380
['3185']
2ef004e324c31585522c025b4026100960a1c0bc
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 @@ -220,9 +220,9 @@ export de...
diff --git a/test/runtime/samples/spread-component-literal/Widget.svelte b/test/runtime/samples/spread-component-literal/Widget.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/spread-component-literal/Widget.svelte @@ -0,0 +1,5 @@ +<script> + export let foo; +</script> + +<p>foo: {foo}</p> diff --g...
Using literal when spreading props generates invalid code ```svelte <Foo {...{ bar: 42 }}/> ``` generates ```js var foo_changes = () ? get_spread_update(foo_spread_levels, [ { bar: 42 } ]) : {}; ``` because `{ bar: 42 }` has no dependencies.
https://github.com/sveltejs/svelte/blob/17096e6b0e73e18d701bcf57bb33718b93439caf/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts#L223 I'd assume we should be generating `var ${name_changes} = {};` when `all_dependencies` is empty.
2019-08-08 16:14:47+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime 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 ...
['runtime spread-component-literal ', 'runtime spread-component-literal (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
3,394
sveltejs__svelte-3394
['2290']
bb9a9efec275084983117adee52718b5a35376b6
diff --git a/src/compiler/compile/render_dom/wrappers/shared/Tag.ts b/src/compiler/compile/render_dom/wrappers/shared/Tag.ts --- a/src/compiler/compile/render_dom/wrappers/shared/Tag.ts +++ b/src/compiler/compile/render_dom/wrappers/shared/Tag.ts @@ -24,7 +24,7 @@ export default class Tag extends Wrapper { const val...
diff --git a/test/js/samples/debug-foo-bar-baz-things/expected.js b/test/js/samples/debug-foo-bar-baz-things/expected.js --- a/test/js/samples/debug-foo-bar-baz-things/expected.js +++ b/test/js/samples/debug-foo-bar-baz-things/expected.js @@ -25,7 +25,7 @@ function get_each_context(ctx, list, i) { // (8:0) {#each th...
View is not updated after change Array inside Object (version: 3.0.0-beta.20) This is not update the view: ``` obj.arr = obj.arr.sort(); obj.arr[0]++ obj.arr[0] += 1 obj.arr[0] = 2 obj.arr2[0][0]++ obj.arr2[0][0] = 3 ``` [See repl](https://svelte.dev/repl/221d07d61d1b5ffedd6c7374b4735e14?version=3.0.0-beta....
I think this is related to #2243. If there's an actual assignment, this should work. It looks like the compiler is inserting the correct calls to `$$invalidate`. I'm not sure what's going on here but I do think there is a bug. Yep, the `$$invalidate` calls are correct. But the template is not updated because of these g...
2019-08-11 18: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 ', '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 ...
['js debug-foo-bar-baz-things', 'runtime reactive-value-coerce (with hydration)', 'js instrumentation-script-x-equals-x', 'js hoisted-const', 'js instrumentation-template-x-equals-x', 'runtime reactive-value-coerce ', 'js each-block-keyed', 'js each-block-keyed-animated', 'js deconflict-builtins', 'js each-block-change...
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/Tag.ts->program->class_declaration:Tag->method_definition:rename_this_method"]
sveltejs/svelte
3,403
sveltejs__svelte-3403
['3321', '3321']
4f26363fe0af69b85b84d3c2d9e5d4fe5dc249d6
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 @@ -84,7 +84,7 @@ function get_namespace(parent: Element, element: Element, explicit_namespace: st : null); } - if (element.name.toLo...
diff --git a/test/runtime/samples/svg-slot-namespace/Widget.svelte b/test/runtime/samples/svg-slot-namespace/Widget.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/svg-slot-namespace/Widget.svelte @@ -0,0 +1,3 @@ +<svg> + <slot /> +</svg> diff --git a/test/runtime/samples/svg-slot-namespace/_config...
SVG elements in <slot> not rendered as SVG elements **Describe the bug** I have a component that is basically an `<svg>` with a `<slot>` the idea being that it's easy to pass some svg tags to the component and have them all rendered the same. This works fine as long as the SVG is passed as an HTML string. `{@html '<re...
I am experiencing similar behavior. I think it may simply be a case of including all the other svg elements in [this check here](https://github.com/sveltejs/svelte/blob/4f26363fe0af69b85b84d3c2d9e5d4fe5dc249d6/src/compiler/compile/nodes/Element.ts#L87). At least, quickly changing it seemed to work for me. I try to repr...
2019-08-13 16:51: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 ', '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 ...
['runtime svg-slot-namespace ', 'runtime svg-slot-namespace (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/Element.ts->program->function_declaration:get_namespace"]
sveltejs/svelte
3,428
sveltejs__svelte-3428
['3322']
1bb0728a5c5c1976269d676ecd925b6bf6858505
diff --git a/src/compiler/compile/render_ssr/handlers/Slot.ts b/src/compiler/compile/render_ssr/handlers/Slot.ts --- a/src/compiler/compile/render_ssr/handlers/Slot.ts +++ b/src/compiler/compile/render_ssr/handlers/Slot.ts @@ -8,7 +8,7 @@ export default function(node: Slot, renderer: Renderer, options: RenderOptions) ...
diff --git a/test/runtime/samples/component-slot-let-missing-prop/Bar.svelte b/test/runtime/samples/component-slot-let-missing-prop/Bar.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-let-missing-prop/Bar.svelte @@ -0,0 +1,5 @@ +<script> + export let thing; +</script> + +<p>{thing}</...
Confusing SSR error when `let:foo` has no corresponding `<slot foo={...}>` **Describe the bug** A component with slotted contents will fail to render if it has a `let:` directive but the corresponding `<slot>` has no properties. **To Reproduce** [This REPL demo](https://svelte.dev/repl/49963e1550274855a2ad2f45...
null
2019-08-19 15:42: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 ', '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 ...
['ssr component-slot-let-missing-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
true
false
false
false
0
0
0
false
false
[]
sveltejs/svelte
3,430
sveltejs__svelte-3430
['1233']
1bb0728a5c5c1976269d676ecd925b6bf6858505
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 @@ -208,6 +208,10 @@ function get_dom_updater( ret...
diff --git a/test/js/samples/input-no-initial-value/expected.js b/test/js/samples/input-no-initial-value/expected.js new file mode 100644 --- /dev/null +++ b/test/js/samples/input-no-initial-value/expected.js @@ -0,0 +1,87 @@ +/* generated by Svelte vX.Y.Z */ +import { + SvelteComponent, + append, + attr, + detach, + e...
Initial Data for Bound Required Input Fields is 'undefined' I believe this is a bug, but it may be a request for more documentation. Apologies if I'm posting this in the wrong spot. Two-way binding an input field causes browsers to display the text `'undefined'`. In the [Two-Way Binding](https://svelte.technolog...
Ah, interesting. When this has come up previously we've decided that setting text fields to `"undefined"` is a) technically the correct behaviour and b) helpful insofar as it encourages people to initialize data (which is a good practice). But Firefox's behaviour changes the equation. I think I'd be on board with not s...
2019-08-19 17:01: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 ', '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 ...
['js input-no-initial-value', 'js input-range']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
2
0
2
false
false
["src/runtime/internal/dom.ts->program->function_declaration:set_input_value", "src/compiler/compile/render_dom/wrappers/Element/Binding.ts->program->function_declaration:get_dom_updater"]
sveltejs/svelte
3,432
sveltejs__svelte-3432
['1830']
51498421bb2803b5126e1286ef5cf061074bf031
diff --git a/src/compiler/compile/render_dom/wrappers/Element/StyleAttribute.ts b/src/compiler/compile/render_dom/wrappers/Element/StyleAttribute.ts --- a/src/compiler/compile/render_dom/wrappers/Element/StyleAttribute.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/StyleAttribute.ts @@ -110,8 +110,9 @@ funct...
diff --git a/test/runtime/samples/inline-style-optimisation-bailout/_config.js b/test/runtime/samples/inline-style-optimisation-bailout/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/inline-style-optimisation-bailout/_config.js @@ -0,0 +1,20 @@ +export default { + html: ` + <p style="opacity:...
Setting inline styles with data elements breaks style Here's a REPL demonstration: https://svelte.technology/repl?version=2.11.0&gist=02e988596c0d0888490384ec44d7f99c Putting a data variable into an inline style tag will try to concatenate your new `key:value;` with the preceding value. The result is that this text,...
Svelte will change to using `cssText` if the entire `style` attribute is taken from a variable: ```html <h1 style="{style}">Hello {name}!</h1> <script> export default { data() { return { style: 'opacity: 0.25; color: #fc0' } } } </script> ``` Just having the `color` value in a variabl...
2019-08-20 03:12:36+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['runtime inline-style-optimisation-bailout ', 'runtime inline-style-optimisation-bailout (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/StyleAttribute.ts->program->function_declaration:get_style_value"]
sveltejs/svelte
3,435
sveltejs__svelte-3435
['1834', '1834']
63a7a37bb7c6820bda0a1716f52ec7eeb9b3711e
diff --git a/src/compiler/compile/render_dom/wrappers/Element/StyleAttribute.ts b/src/compiler/compile/render_dom/wrappers/Element/StyleAttribute.ts --- a/src/compiler/compile/render_dom/wrappers/Element/StyleAttribute.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/StyleAttribute.ts @@ -10,6 +10,7 @@ import ...
diff --git a/test/runtime/samples/inline-style-important/_config.js b/test/runtime/samples/inline-style-important/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/inline-style-important/_config.js @@ -0,0 +1,18 @@ +export default { + html: ` + <p class="svelte-y94hdy" style="color: red !importa...
inline !important styles don't get added I'm using svelte 2.15.0 if my template has inline !important styles like `<div style="margin:10px !important"></div>` the compiler will create `setStyle(node, 'margin', '10px !important')` which in the end executes `node.style.setProperty('margin', '10px !important')...
Inline styles don't need `!important`, since they already override every other css definition for that specific element 🤔 True, apart from if you were trying to use `!important` to override `!important`. Probably a sign something's amiss though of you're doing that. Inline styles don't need `!important`, since they al...
2019-08-20 12:25:36+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['runtime inline-style-important (with hydration)', 'runtime inline-style-important ']
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/dom.ts->program->function_declaration:set_style", "src/compiler/compile/render_dom/wrappers/Element/StyleAttribute.ts->program->function_declaration:get_style_value", "src/compiler/compile/render_dom/wrappers/Element/StyleAttribute.ts->program->class_declaration:StyleAttributeWrapper->method_defi...
sveltejs/svelte
3,442
sveltejs__svelte-3442
['2443']
860040a7fad9cff8297cb2a72dbba0be9a100279
diff --git a/src/runtime/internal/await_block.ts b/src/runtime/internal/await_block.ts --- a/src/runtime/internal/await_block.ts +++ b/src/runtime/internal/await_block.ts @@ -1,6 +1,7 @@ import { assign, is_promise } from './utils'; import { check_outros, group_outros, transition_in, transition_out } from './transiti...
diff --git a/test/runtime/samples/context-in-await/Child.svelte b/test/runtime/samples/context-in-await/Child.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/context-in-await/Child.svelte @@ -0,0 +1,6 @@ +<script> + import { getContext } from 'svelte'; + const num = getContext('test'); +</script> +...
Incorrect context in child component inside await [REPL](https://svelte.dev/repl?version=3.0.0-beta.28&gist=28e8889cf4022f33868d6adba34e19d0)
[The global `current_component` is reset back to `undefined` in the `App` init](https://github.com/sveltejs/svelte/blob/master/src/internal/Component.js#L112) before the [promise in `handle_promise`](https://github.com/sveltejs/svelte/blob/211d86b4f810670d6549ba196c569a0b9f5d6d6a/src/internal/await-block.js#L45) is res...
2019-08-21 18:39:12+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['runtime context-in-await ', 'runtime context-in-await (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/runtime/internal/await_block.ts->program->function_declaration:handle_promise", "src/runtime/internal/lifecycle.ts->program->function_declaration:get_current_component"]
sveltejs/svelte
3,443
sveltejs__svelte-3443
['2569']
860040a7fad9cff8297cb2a72dbba0be9a100279
diff --git a/src/compiler/compile/nodes/shared/Expression.ts b/src/compiler/compile/nodes/shared/Expression.ts --- a/src/compiler/compile/nodes/shared/Expression.ts +++ b/src/compiler/compile/nodes/shared/Expression.ts @@ -147,7 +147,10 @@ export default class Expression { contextual_dependencies.add(name); ...
diff --git a/test/runtime/samples/each-block-keyed-index-in-event-handler/_config.js b/test/runtime/samples/each-block-keyed-index-in-event-handler/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/each-block-keyed-index-in-event-handler/_config.js @@ -0,0 +1,18 @@ +export default { + html: ` + ...
Index of elements in each loop are not reactive inside if blocks REPL: https://svelte.dev/repl?version=3.0.1&gist=5b40d855b7b1627769fdcfff259a9fcb Index specified on event handlers, inside if blocks within each blocks, do not get updated reactively. However, it does work if the index is displayed inside the if block...
Maybe related to #2444? More minimal example of the bug, also only occurs with keyed each blocks. See this [REPL](https://svelte.dev/repl/5e6ddfa1ae4c47cfbee57affee264368?version=3.4.4) example based on @pk-iegaa sample
2019-08-21 20:25: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 ', '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 ...
['runtime each-block-keyed-index-in-event-handler ', 'runtime each-block-keyed-index-in-event-handler (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/shared/Expression.ts->program->class_declaration:Expression->method_definition:constructor->method_definition:enter"]
sveltejs/svelte
3,451
sveltejs__svelte-3451
['2731']
64c56eddcd76d2f88bb2c42488f4b5d8df48a54d
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 @@ -1069,9 +1069,12 @@ export default class Component { } else if (name[0] === '$' && !owner) { hoistable = false; } else if (owner ===...
diff --git a/test/runtime/samples/reactive-value-function/_config.js b/test/runtime/samples/reactive-value-function/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/reactive-value-function/_config.js @@ -0,0 +1,9 @@ +export default { + html: `1-2`, + + async test({ assert, component, target }) {...
Function identifiers declared in function statements don't participate in reactive blocks. Function declaration statements don't declare `const` identifiers in Javascript. Svelte should treat these as variables and watch for reassignments so that `$:` reactive labels work as expected. https://svelte.dev/repl/70ef...
In the generated code, we do have an `$$invalidate` call where the function statement is reassigned, but the reactive code block that uses it doesn't check whether it's been marked as dirty. Early on, we decided that exported function statements should not correspond to writable props, even though the function would...
2019-08-22 20:31: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 ', '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 ...
['runtime reactive-value-function ', 'runtime reactive-value-function (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:hoist_instance_declarations->method_definition:enter"]
sveltejs/svelte
3,478
sveltejs__svelte-3478
['3447']
8977da840a673fe196bae399c78823cc093fe662
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 @@ -39,7 +39,7 @@ class IfBlockBranch extends Wrapper { const is_else = !expressio...
diff --git a/test/js/samples/if-block-complex/expected.js b/test/js/samples/if-block-complex/expected.js new file mode 100644 --- /dev/null +++ b/test/js/samples/if-block-complex/expected.js @@ -0,0 +1,81 @@ +/* generated by Svelte vX.Y.Z */ +import { + SvelteComponent, + attr, + detach, + element, + empty, + init, + i...
Can not compile complex {#if} While using a complex {#if} statement, svelte is compiling to invalid javascript. ```js <script> let item = { divider: [1], sub: { first: '/first', second: '/2', third: '/3' } } </script> {#each Object.entries(item.sub) as [subName, path], i} {#if (item.div...
Yep, thanks. This worked in 3.9.0. Presumably caused by #3438.
2019-08-30 16:04:38+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime 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 ...
['runtime if-block-static-with-dynamic-contents ', 'js transition-local', 'js if-block-complex', 'js transition-repeated-outro', 'runtime if-block-static-with-dynamic-contents (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
4
0
4
false
false
["src/compiler/compile/render_dom/wrappers/IfBlock.ts->program->class_declaration:IfBlockWrapper->method_definition:render_compound", "src/compiler/compile/render_dom/wrappers/IfBlock.ts->program->class_declaration:IfBlockWrapper->method_definition:render_compound_with_outros", "src/compiler/compile/render_dom/wrappers...
sveltejs/svelte
3,518
sveltejs__svelte-3518
['3505']
cc107147ec3715ef3d70d6506b933a54d126e84b
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 @@ -74,6 +74,7 @@ class IfBlockBranch extends Wrapper { export default class IfBlock...
diff --git a/test/runtime/samples/if-block-static-with-else-and-outros/EEE.svelte b/test/runtime/samples/if-block-static-with-else-and-outros/EEE.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/if-block-static-with-else-and-outros/EEE.svelte @@ -0,0 +1 @@ +eee \ No newline at end of file diff --git...
if/else regression in 3.9.2 **Describe the bug** {#if "Eva".startsWith('E')} eee {:else} rrr {/if} will throw an error **To Reproduce** https://svelte.dev/repl/60ba4405814042e4925edc98e3bcc797?version=3.9.2 **Expected behavior** no error **Stacktraces** Rollup: Unexpected token (Note that you ...
This appeared in 3.9.1, and apparently #3478 in 3.9.2 was an incomplete fix. This seems to be caused by an empty dependencies array in IfBlocks.ts file, generated code is ```javascript if ((show_if == null) || ) show_if = !!("Eva".startsWith('E') == true) ``` Updating line 246 to check the array length should ...
2019-09-06 13:25:13+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['runtime if-block-static-with-else-and-outros (with hydration)', 'runtime if-block-static-with-else ', 'runtime if-block-static-with-else (with hydration)', 'runtime if-block-static-with-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
false
false
true
3
1
4
false
false
["src/compiler/compile/render_dom/wrappers/IfBlock.ts->program->class_declaration:IfBlockWrapper->method_definition:render_compound", "src/compiler/compile/render_dom/wrappers/IfBlock.ts->program->class_declaration:IfBlockWrapper->method_definition:render_compound_with_outros", "src/compiler/compile/render_dom/wrappers...
sveltejs/svelte
3,529
sveltejs__svelte-3529
['3526']
41f5961ef965ee6dc5e91ba94d60464ca2d3d7f0
diff --git a/src/compiler/compile/nodes/Attribute.ts b/src/compiler/compile/nodes/Attribute.ts --- a/src/compiler/compile/nodes/Attribute.ts +++ b/src/compiler/compile/nodes/Attribute.ts @@ -5,27 +5,28 @@ import Node from './shared/Node'; import Element from './Element'; import Text from './Text'; import Expression ...
diff --git a/test/js/samples/component-static-var/expected.js b/test/js/samples/component-static-var/expected.js new file mode 100644 --- /dev/null +++ b/test/js/samples/component-static-var/expected.js @@ -0,0 +1,112 @@ +/* generated by Svelte vX.Y.Z */ +import { + SvelteComponent, + destroy_component, + detach, + ele...
Component update code generated unnecessarily **Describe the bug** A component with no props that could change will nevertheless get update code generated **To Reproduce** https://svelte.dev/repl/f26f7150be604723a047981635d30d0e?version=3.9.2 **Expected behavior** ```diff return { c() { foo.$$.f...
null
2019-09-07 21:16: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 ', '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 ...
['js component-static-var']
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
7
1
8
false
false
["src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts->program->class_declaration:InlineComponentWrapper->method_definition:render", "src/compiler/compile/nodes/Attribute.ts->program->class_declaration:Attribute", "src/compiler/compile/nodes/Attribute.ts->program->class_declaration:Attribute->method_defin...
sveltejs/svelte
3,530
sveltejs__svelte-3530
['3524']
41f5961ef965ee6dc5e91ba94d60464ca2d3d7f0
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 @@ -468,15 +468,25 @@ export default class ElementWrapper ext...
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 @@ -19,8 +19,10 @@ function create_fragment(ctx) { function audio_timeupdate_handler() { cancelAnimationFrame(audi...
Media Element Binding for set currentTime is unreliable **Describe the bug** The [Media Element Binding](https://svelte.dev/docs#Media_element_bindings) for setting `bind:currentTime={time}` is unreliable when setting single times. For example a list of video position index markers. Clicking on an index, which sets ...
null
2019-09-07 21:37:36+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['js media-bindings']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
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_bindings"]
sveltejs/svelte
3,534
sveltejs__svelte-3534
['3455']
41f5961ef965ee6dc5e91ba94d60464ca2d3d7f0
diff --git a/src/compiler/compile/render_dom/Block.ts b/src/compiler/compile/render_dom/Block.ts --- a/src/compiler/compile/render_dom/Block.ts +++ b/src/compiler/compile/render_dom/Block.ts @@ -10,7 +10,7 @@ export interface BlockOptions { renderer?: Renderer; comment?: string; key?: string; - bindings?: Map<str...
diff --git a/test/runtime/samples/store-each-binding-destructuring/_config.js b/test/runtime/samples/store-each-binding-destructuring/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/store-each-binding-destructuring/_config.js @@ -0,0 +1,14 @@ +export default { + async test({ assert, target, win...
Store binding inside each is broken **Describe the bug** This doesn't work: ```svelte {#each $items as item, index} <input bind:value={item.text}> {/each} ``` **To Reproduce** https://svelte.dev/repl/358a3620fd6b4f159a90268a6b2035a4?version=3.9.1 **Expected behavior** Editing the text input shou...
As a workaround, this works: ``` <input bind:value={$items[index].text}> ``` Might help track down how to correct it.
2019-09-08 08:27:12+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['runtime store-each-binding-destructuring (with hydration)', 'runtime store-each-binding ', 'runtime store-each-binding-destructuring ', 'runtime store-each-binding (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
2
1
3
false
false
["src/compiler/compile/render_dom/Block.ts->program->class_declaration:Block", "src/compiler/compile/render_dom/wrappers/EachBlock.ts->program->class_declaration:EachBlockWrapper->method_definition:constructor", "src/compiler/compile/render_dom/wrappers/Element/Binding.ts->program->function_declaration:get_event_handle...
sveltejs/svelte
3,538
sveltejs__svelte-3538
['3537']
3f33d355732147accc8f8a482984a840e8cef828
diff --git a/src/compiler/compile/utils/invalidate.ts b/src/compiler/compile/utils/invalidate.ts --- a/src/compiler/compile/utils/invalidate.ts +++ b/src/compiler/compile/utils/invalidate.ts @@ -18,7 +18,8 @@ export function invalidate(component: Component, scope: Scope, code: MagicString ( variable.referenced...
diff --git a/test/runtime/samples/store-unreferenced/Nested.svelte b/test/runtime/samples/store-unreferenced/Nested.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/store-unreferenced/Nested.svelte @@ -0,0 +1,5 @@ +<script> + import { count } from './store.js'; +</script> + +<p>count: {$count}</p> \...
Store value not set via $-prefix if not used in template Code for updating store value doesn't generated if store value actually not used in the component even if it used in other components. REPL: https://svelte.dev/repl/ebcbacf20ea3402c990c92c7caf81ac6?version=3.10.1 If uncomment store usage in template example...
Should be mentioned that this worked in 3.10.0 as per repl url change thanks — looking into it
2019-09-08 22:36: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 ...
['runtime store-unreferenced (with hydration)', 'runtime store-unreferenced ']
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/utils/invalidate.ts->program->function_declaration:invalidate"]
sveltejs/svelte
3,546
sveltejs__svelte-3546
['3545']
c250793b358f6002b8f78fcda7b40008a35f6642
diff --git a/src/compiler/compile/render_dom/Block.ts b/src/compiler/compile/render_dom/Block.ts --- a/src/compiler/compile/render_dom/Block.ts +++ b/src/compiler/compile/render_dom/Block.ts @@ -2,7 +2,7 @@ import CodeBuilder from '../utils/CodeBuilder'; import deindent from '../utils/deindent'; import Renderer from ...
diff --git a/test/runtime/samples/sigil-component-attribute/Widget.svelte b/test/runtime/samples/sigil-component-prop/Widget.svelte similarity index 100% rename from test/runtime/samples/sigil-component-attribute/Widget.svelte rename to test/runtime/samples/sigil-component-prop/Widget.svelte diff --git a/test/runtime/s...
Unable to handle `@` in attribute values since Svelte v3.12.0 **Describe the bug** It seems that after upgrading to Svelte 3.12.0, using an @ in an attribute value causes a compiler error on the client. This works as expected in 3.11.0 **Logs** ``` > TODO@0.0.1 dev /home/ant/Projects/martin-clunes > sapper de...
This is almost certainly a bug in Svelte and not in Sapper, although I'm not sure why I'm having trouble reproducing it with Svelte alone. Moving the issue to the Svelte repo. Whoops, I was thinking in a box. This reproduces it in the REPL, when compiled with dev mode on: ```svelte <Foo bar="@baz"> </Foo> ``` ...
2019-09-10 15:38: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 ', '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 ...
['runtime sigil-component-prop ', 'runtime sigil-component-prop (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/Block.ts->program->class_declaration:Block->method_definition:get_contents"]
sveltejs/svelte
3,552
sveltejs__svelte-3552
['1710']
14a46a17d0ec837a66386cec0dbcd3bdabc29695
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## Unreleased + +* Fix edge cases in matching selectors against elements ([#1710](https://github.com/sveltejs/svelte/issues/1710)) + ## 3.12.1 * Escape `@` symbols in props, again ([#3545](https://g...
diff --git a/test/css/samples/weird-selectors/expected.css b/test/css/samples/weird-selectors/expected.css new file mode 100644 --- /dev/null +++ b/test/css/samples/weird-selectors/expected.css @@ -0,0 +1 @@ +.-foo.svelte-xyz{color:red}[title='['].svelte-xyz{color:blue} \ No newline at end of file diff --git a/test/css...
CSS classes starting with `-` is always unused and `--` throws CSS allow classes starting with `-`, but the svelte compiler flags them as unused [REPL](https://svelte.technology/repl?version=2.13.2&gist=f146227d9270080eea32d537a70376a8) With double `--` it's even worse [REPL](https://svelte.technology/repl?version=...
The 'identifier is expected' exception that's thrown in the second example is thrown by the underlying `css-tree` library we're using for CSS parsing. According to [this SO answer](https://stackoverflow.com/a/449000), beginning a class name with a double hyphen is actually illegal according to the spec. I don't know ho...
2019-09-11 22:27: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 ', '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 ...
['css weird-selectors']
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
0
5
false
false
["src/compiler/compile/css/Selector.ts->program->function_declaration:class_matches", "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_de...
sveltejs/svelte
3,640
sveltejs__svelte-3640
['3634']
5dda05213eb236c9d9b7f42d38d86c79dbdf42b1
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 @@ -1265,10 +1265,16 @@ export default class Component { } if (node.type === 'AssignmentExpression') { - extract_identifiers(get_object...
diff --git a/test/runtime/samples/reactive-compound-operator/_config.js b/test/runtime/samples/reactive-compound-operator/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/reactive-compound-operator/_config.js @@ -0,0 +1,27 @@ +export default { + html: ` + <button>+1</button> + <p>count: 0</p> ...
Compound operators don't work in reactive statements **Describe the bug** Compound operators don't work in reactive statements, I suspect this has to do with the fact that there are no variables the assignment depends on. So it is not run when the value of the left hand side of the operator changes. **To Reproduce*...
I haven't checked this, but I believe what needs to be done for there is to make the identifier in `UpdateExpression`s [here](https://github.com/sveltejs/svelte/blob/5d8ca9f07db206556c6634746384c7778e12e8cb/src/compiler/compile/Component.ts#L1272) also be added as a dependency.
2019-09-30 21:43:22+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'runtime if-block-else ', '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 ...
['runtime reactive-compound-operator ', 'runtime reactive-compound-operator (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:extract_reactive_declarations->method_definition:enter"]
sveltejs/svelte
3,663
sveltejs__svelte-3663
['3660']
def776520f3d8f0d0cb9707ee06db50b8cf93586
diff --git a/src/runtime/internal/await_block.ts b/src/runtime/internal/await_block.ts --- a/src/runtime/internal/await_block.ts +++ b/src/runtime/internal/await_block.ts @@ -14,6 +14,8 @@ export function handle_promise(promise, info) { const child_ctx = assign(assign({}, info.ctx), info.resolved); const block = ...
diff --git a/test/runtime/samples/await-set-simultaneous-reactive/_config.js b/test/runtime/samples/await-set-simultaneous-reactive/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/await-set-simultaneous-reactive/_config.js @@ -0,0 +1,13 @@ +export default { + html: `<p>wait for it...</p>`, + te...
bind:this used in {#await} does not trigger reaction **Describe the bug** From Stackoverflow [https://stackoverflow.com/questions/58228948/how-do-i-trigger-a-reaction-when-bindthis-is-used-in-await-in-svelte] ``` <script> import TapHere from './TapHere.svelte'; let enableButton; $: enableButtonRect...
null
2019-10-06 03:05: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 ', '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 ...
['runtime await-set-simultaneous-reactive ', 'runtime await-set-simultaneous-reactive (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
3,679
sveltejs__svelte-3679
['3544', '3544']
af0557a2d41e468e98f179607693eba28c652e2e
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 @@ -4,6 +4,12 @@ import { gather_possible_values, UNKNOWN } from './gather_possible_values'; import { CssNode } from './interfaces'; import Com...
diff --git a/test/css/samples/omit-scoping-attribute-global-children/expected.css b/test/css/samples/omit-scoping-attribute-global-children/expected.css new file mode 100644 --- /dev/null +++ b/test/css/samples/omit-scoping-attribute-global-children/expected.css @@ -0,0 +1 @@ +.root.svelte-xyz p{color:red} \ No newline...
Dynamic class breaks CSS selector **Describe the bug** Some style rules aren't being applied when there is a dynamic class between the root node and target node of the selector. **Logs** N/A **To Reproduce** [https://svelte.dev/repl/c122185d662a4897a4cda657d07a3027?version=3.12.0](https://svelte.dev/repl/c1221...
The problem here is that, the container div doesn't get the svelte-generated class name. The child's class can be any variable declared in a script tag too, and an {#if} tag also causes the same problem, so I guess it can be reproduced with any svelte-tag. ``` <div class="root"> {#if true} <div class="{aNumber...
2019-10-09 19:01: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 omit-scoping-attribute-multiple-descendants', 'css omit-scoping-attribute-global-descendants']
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->class_declaration:Selector->method_definition:apply", "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
3,687
sveltejs__svelte-3687
['3681']
43245a30fd051904f90b80cebbcc97d38c4484ee
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * Fix tracking of dependencies of compound assignments in reactive statements ([#3634](https://github.com/sveltejs/svelte/issues/3634)) * Flush changes in newly attached block when using `{#await}` ([#3660](https://github.c...
diff --git a/test/runtime/samples/spread-element-readonly/_config.js b/test/runtime/samples/spread-element-readonly/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/spread-element-readonly/_config.js @@ -0,0 +1,9 @@ +export default { + skip_if_ssr: true, // DOM and SSR output is different, a sep...
Spread operator doesn't work with "form" and "list" attributes **Describe the bug** I'll try set `list` and `form` with spread operator: ```js let [type, form, list] = ['text', 'myID', 'listID']; let props = {type, form, list}; ``` It works in regular case: ```html <input type={type} form={form} list={list}> ...
This looks like another manifestation for an overarching problem which might not actually have its own issue (just a few related open issues) - namely, that we don't know whether each prop that's getting spread should be set as an attribute or as a property on the element. For non-spread props, we can look this stuff u...
2019-10-11 14:37: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 ', '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 ...
['runtime spread-element-readonly (with hydration)', 'runtime spread-element-readonly ']
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
3,692
sveltejs__svelte-3692
['3674']
0d20fb9b8d54daa67da472cc3a2cba8c85e782e2
diff --git a/src/compiler/compile/nodes/shared/Expression.ts b/src/compiler/compile/nodes/shared/Expression.ts --- a/src/compiler/compile/nodes/shared/Expression.ts +++ b/src/compiler/compile/nodes/shared/Expression.ts @@ -127,7 +127,7 @@ export default class Expression { if (scope.has(name)) return; - if...
diff --git a/test/runtime/samples/globals-shadowed-by-each-binding/_config.js b/test/runtime/samples/globals-shadowed-by-each-binding/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/globals-shadowed-by-each-binding/_config.js @@ -0,0 +1,3 @@ +export default { + html: '<p>Alert1</p><p>Alert2</p>...
Incorrect work #each with 'alert' as item name [See this repl](https://svelte.dev/repl/d7858ca7293a4aadae79d1c13044bb69?version=3.12.1) This code: ``` {#each alerts as alert} <p>{alert}</p> {/each} ``` display the system alert() function instead the alerts item: ``` function alert() { [native code] } funct...
null
2019-10-12 11:55: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 ', '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 ...
['runtime globals-shadowed-by-each-binding (with hydration)', 'runtime globals-shadowed-by-each-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
Bug Fix
false
true
false
false
2
0
2
false
false
["src/compiler/compile/nodes/shared/Expression.ts->program->class_declaration:Expression->method_definition:render->method_definition:enter", "src/compiler/compile/nodes/shared/Expression.ts->program->class_declaration:Expression->method_definition:constructor->method_definition:enter"]
sveltejs/svelte
3,702
sveltejs__svelte-3702
['3588']
565931dff957545bf1b8a9ea57cfc097ed1a7e83
diff --git a/src/compiler/compile/render_dom/wrappers/DebugTag.ts b/src/compiler/compile/render_dom/wrappers/DebugTag.ts --- a/src/compiler/compile/render_dom/wrappers/DebugTag.ts +++ b/src/compiler/compile/render_dom/wrappers/DebugTag.ts @@ -59,21 +59,19 @@ export default class DebugTagWrapper extends Wrapper { ....
diff --git a/test/js/samples/debug-no-dependencies/_config.js b/test/js/samples/debug-no-dependencies/_config.js new file mode 100644 --- /dev/null +++ b/test/js/samples/debug-no-dependencies/_config.js @@ -0,0 +1,5 @@ +export default { + options: { + dev: true + } +}; \ No newline at end of file diff --git a/test/js/...
Compile error: Nested loops with index broke after 3.9.1 **Describe the bug** You can see the exact same weird parsing behavior in the example below **Logs** Generated code is wrong, for instance when using `{@debug paneIndex}` it generates this: ![image](https://user-images.githubusercontent.com/181384/65169506-...
@Xerios, the code from the REPL builds and works under **3.12.1** when building for production via `npm run build` and `npm run start` so I think it really is debugging/dev codegen that is causing the issue. The `if ()` is still the culprit, as you said, though. Turns out my issue was some sort of race condition. ...
2019-10-13 06:16: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 ', '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 ...
['js debug-no-dependencies']
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/DebugTag.ts->program->class_declaration:DebugTagWrapper->method_definition:render"]
sveltejs/svelte
3,743
sveltejs__svelte-3743
['3591']
65d87e51d1041b26292b6b3f1f03d7495e40efff
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Allow exiting a reactive block early with `break $` ([#2828](https://github.com/sveltejs/svelte/issues/2828)) * Check attributes have changed before setting them to avoid image flicker ([#3579](https://github.com/sveltejs...
diff --git a/test/runtime/samples/binding-this-store/_config.js b/test/runtime/samples/binding-this-store/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/binding-this-store/_config.js @@ -0,0 +1,4 @@ +export default { + skip_if_ssr: true, + html: `<div>object</div>` +}; diff --git a/test/runtim...
bind:this fails with store **Describe the bug** Using `bind:this` and a writable store together doesn't provide expected behavior. **Logs** No error log. **To Reproduce** Can be reproduced in REPL: ``` <script> import { writable } from 'svelte/store' let ref = writable(null) </script> <h1 bind:this={...
This looks to be fixed by ```diff diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts index ee24fc70..042a755f 100644 --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -777,7 +777,7 @@ export default class Component { } if (name[0] === '...
2019-10-19 05:45: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 ', '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 ...
['runtime binding-this-store (with hydration)', 'runtime binding-this-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
1
0
1
true
false
["src/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:invalidate"]
sveltejs/svelte
3,749
sveltejs__svelte-3749
['3595']
8d7d0ff7dd7b248ca6d9b6b4cac098430c6e6ffa
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Allow exiting a reactive block early with `break $` ([#2828](https://github.com/sveltejs/svelte/issues/2828)) * Check attributes have changed before setting them to avoid image flicker ([#3579](https://github.com/sveltejs...
diff --git a/test/runtime/samples/if-block-compound-outro-no-dependencies/_config.js b/test/runtime/samples/if-block-compound-outro-no-dependencies/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/if-block-compound-outro-no-dependencies/_config.js @@ -0,0 +1,3 @@ +export default { + html: `blah ...
Malformed generated code in a situation I can't describe **Describe the bug** For ```svelte {#if $foo} {:else} {#if bar()} <Baz/> {/if} {/if} ``` or alternatively ```svelte {#if $foo} {:else if bar()} <Baz/> {/if} ``` Svelte generates code like `if ((show_if == null) || ) show_if = !!(bar(...
An equivalent bug seems to be currently present in that branch. I'm getting an error about reducing an empty array [here](https://github.com/sveltejs/svelte/blob/d731766f3488bab42f14ad264f7092b592b937e3/src/compiler/compile/render_dom/wrappers/shared/changed.ts#L6), but at least a compile-time exception is better than ...
2019-10-19 17:00: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 ', '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 ...
['runtime if-block-compound-outro-no-dependencies ', 'runtime if-block-compound-outro-no-dependencies (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/IfBlock.ts->program->class_declaration:IfBlockWrapper->method_definition:render_compound", "src/compiler/compile/render_dom/wrappers/IfBlock.ts->program->class_declaration:IfBlockWrapper->method_definition:render_compound_with_outros"]
sveltejs/svelte
3,751
sveltejs__svelte-3751
['3735']
8d7d0ff7dd7b248ca6d9b6b4cac098430c6e6ffa
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 @@ -301,7 +301,7 @@ export default function dom( return !variable || variable.hoistable; }) .map(({ name }) => b` - $...
diff --git a/test/runtime/samples/store-imported/_config.js b/test/runtime/samples/store-imported/_config.js --- a/test/runtime/samples/store-imported/_config.js +++ b/test/runtime/samples/store-imported/_config.js @@ -1,4 +1,6 @@ export default { + compileOptions: { dev: true }, // tests `@validate_store` code genera...
[svelte@next] Fails to compile with imported stores Compilation Error: `Unexpected token (Note that you need plugins to import files that are not JavaScript)`. REPL: https://svelte.dev/repl/8c33aff5b60b4eb49e721c7b2692862a?version=3.13.0-alpha.0 This works with `version=3.12`. The package that I am using here...
The compiler is producing strange malformed js in this case, but only in dev mode. The imports up at the top of the file look like ```js import { SvelteComponentDev, component_subscribe, detach_dev, dispatch_dev, init, insert_dev, noop, safe_not_equal, set_data_dev, text, validate_store(ready,...
2019-10-19 19:05: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 ', '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 ...
['runtime store-imported ', 'runtime store-imported (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/index.ts->program->function_declaration:dom"]