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
5,986
sveltejs__svelte-5986
['5066']
b764374b6299d079db13418bbbddc58707bef59c
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased * In custom elements, call `onMount` functions when connecting and clean up when disconnecting ([#1152](https://github.com/sveltejs/svelte/issues/1152), [#2227](https://github.com/sveltejs/svelte/issues/2227...
diff --git a/test/runtime/samples/each-block-destructured-default-before-initialised/_config.js b/test/runtime/samples/each-block-destructured-default-before-initialised/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/each-block-destructured-default-before-initialised/_config.js @@ -0,0 +1,5 @@...
{#each} block destructuring can't have default values refer to destructured params **Describe the bug** There's a useful pattern you can use while destructuring in normal JS, which is that within the destructure you can reference previously-extracted properties. [Live Example](https://flems.io/#0=N4IgZglgNgpgziAX...
null
2021-02-13 10:28:17+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ...
['runtime each-block-destructured-default-binding (with hydration)', 'runtime each-block-destructured-default ', 'runtime each-block-destructured-default (with hydration)', 'runtime each-block-destructured-default-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
9
0
9
false
false
["src/compiler/compile/nodes/shared/Context.ts->program->function_declaration:update_reference", "src/compiler/compile/nodes/AwaitBlock.ts->program->class_declaration:AwaitBlock->method_definition:constructor", "src/compiler/compile/render_dom/wrappers/EachBlock.ts->program->class_declaration:EachBlockWrapper->method_d...
sveltejs/svelte
6,042
sveltejs__svelte-6042
['3542']
c56653dfd64625612258b290b1d57ee440962761
diff --git a/src/compiler/compile/render_dom/wrappers/Slot.ts b/src/compiler/compile/render_dom/wrappers/Slot.ts --- a/src/compiler/compile/render_dom/wrappers/Slot.ts +++ b/src/compiler/compile/render_dom/wrappers/Slot.ts @@ -164,12 +164,17 @@ export default class SlotWrapper extends Wrapper { ? Array.from(this.fa...
diff --git a/test/runtime/samples/transition-js-slot-2/Nested.svelte b/test/runtime/samples/transition-js-slot-2/Nested.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/transition-js-slot-2/Nested.svelte @@ -0,0 +1,18 @@ +<script> + export let visible; + + function fade(node) { + return { + durat...
Transitioning when slot element changes does not update slot element **Describe the bug** If a transition happens on an element that contains a slot, the slot does not properly update if it is rendered again immediately after the transition ends. **To Reproduce** https://svelte.dev/repl/46ba49b1c588454f8f4899b...
I am having the same problem with slots. I thought awaiting the tick could work but that didnt either. This isnt a huge problem for now, but I can see it being a great feature if this gets fixed in the future Ok I found a weird solution to this. If you have the show flag toggle between 2 slots rather than hide and show...
2021-03-02 14:25:34+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', '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 hydration)', 'runtime ...
['runtime transition-js-slot-2 ', 'runtime transition-js-slot-2 (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/Slot.ts->program->class_declaration:SlotWrapper->method_definition:render"]
sveltejs/svelte
6,110
sveltejs__svelte-6110
['5990']
ce3a5791258ec6ecf8c1ea022cb871afe805a45c
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 @@ -96,7 +96,7 @@ export default class Attribute extends Node { } get_static_value() { - if (this.is_spread || this.dependenci...
diff --git a/test/validator/samples/a11y-anchor-has-content/input.svelte b/test/validator/samples/a11y-anchor-has-content/input.svelte --- a/test/validator/samples/a11y-anchor-has-content/input.svelte +++ b/test/validator/samples/a11y-anchor-has-content/input.svelte @@ -1 +1,2 @@ -<a href='/foo'></a> \ No newline at en...
Invalid "A11y: '#' is not a valid href attribute" `<a href="#{'a'}">hello</a>` The url is #a, not #.
```html <script> let name = 'world'; </script> <a href="#{name}">hello</a> ``` this seems to work 👀
2021-03-21 13:43:01+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', '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 hydration)', 'runtime ...
['validate a11y-anchor-has-content']
null
. /usr/local/nvm/nvm.sh && 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/Attribute.ts->program->class_declaration:Attribute->method_definition:get_static_value"]
sveltejs/svelte
6,149
sveltejs__svelte-6149
['6137']
c7e820e08fade3b26e84de9025cd564bac87fbed
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 @@ -82,7 +82,8 @@ const valid_modifiers = new Set([ 'once', 'passive', 'nonpassive', - 'self' + 'self', + 'trusted' ]); const passi...
diff --git a/test/runtime/samples/event-handler-modifier-trusted/_config.js b/test/runtime/samples/event-handler-modifier-trusted/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/event-handler-modifier-trusted/_config.js @@ -0,0 +1,9 @@ +export default { + async test({ assert, component, target,...
trusted events modifier **Is your feature request related to a problem? Please describe.** To make events like on:click not programmatical callable, I wish the events to check if the event isTrusted. Problem is, i have to check it in each function. **Describe the solution you'd like** A eventModifier like |once o...
null
2021-03-30 09:37:22+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', '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 hydration)', 'runtime ...
['ssr event-handler-modifier-trusted', 'runtime event-handler-modifier-trusted (with hydration)', 'runtime event-handler-modifier-trusted ', 'validate event-modifiers-invalid']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Feature
false
true
false
false
2
0
2
false
false
["src/runtime/internal/dom.ts->program->function_declaration:trusted", "src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts->program->class_declaration:EventHandlerWrapper->method_definition:render"]
sveltejs/svelte
6,170
sveltejs__svelte-6170
['6126']
f322e3fba41cb4f67b34b389d039e8baeb9cba3a
diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -221,6 +221,8 @@ export function select_option(select, value) { return; } } + + select.selectedIndex = -1; // no option should be selected } export function select_o...
diff --git a/test/runtime/samples/binding-select-initial-value-undefined/_config.js b/test/runtime/samples/binding-select-initial-value-undefined/_config.js --- a/test/runtime/samples/binding-select-initial-value-undefined/_config.js +++ b/test/runtime/samples/binding-select-initial-value-undefined/_config.js @@ -14,6 ...
First option in select dropdown appears selected when no option matches the bound value **Describe the bug** When a select dropdown value is bound to a component variable, and this variable doesn't match any of the options in the dropdown, Svelte shows the first option as selected rather than blank. This causes bugs/u...
> No option should be selected when none of the options match the bound value. > For my app it is important that select dropdowns be blank when none of the options match the bound value. Does this even work in plain HTML? That's why every `<select>` ever has an option with an empty value that says "Please select...
2021-04-06 23:46: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 ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', '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 hydration)', 'runtime ...
['runtime binding-select-unmatched (with hydration)', 'runtime binding-select-unmatched ']
null
. /usr/local/nvm/nvm.sh && 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:select_option"]
sveltejs/svelte
6,223
sveltejs__svelte-6223
['6222']
697d4c7f5199ad1fe0d8283bd8fd151401f2f467
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 @@ -51,7 +51,7 @@ export default class Selector { } apply(node: Element) { - const to_encapsulate: any[] = []; + const to_encapsulate: Ar...
diff --git a/test/css/samples/global-compound-selector/_config.js b/test/css/samples/global-compound-selector/_config.js new file mode 100644 --- /dev/null +++ b/test/css/samples/global-compound-selector/_config.js @@ -0,0 +1,27 @@ +export default { + warnings: [ + { + code: 'css-unused-selector', + frame: ` + ...
Support :global() in compound selector If i have the following: ```svelte <script> function action(node) { if (some_condition) { node.classList.add('xxx'); } } </script> <p use:action /> <style> p.xxx { color: green; } </style> ``` the selector `p.xxx` will get...
null
2021-04-22 01:23:48+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', '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 hydration)', 'runtime ...
['css global-compound-selector', 'css global']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Feature
false
false
false
true
9
1
10
false
false
["src/compiler/compile/css/Selector.ts->program->function_declaration:apply_selector", "src/compiler/compile/css/Selector.ts->program->class_declaration:Selector->method_definition:transform", "src/compiler/compile/css/Selector.ts->program->class_declaration:Block", "src/compiler/compile/css/Selector.ts->program->class...
sveltejs/svelte
6,237
sveltejs__svelte-6237
['5628']
a39fc8de728ba292523828e1cf6f6254f125c640
diff --git a/src/compiler/compile/nodes/InlineComponent.ts b/src/compiler/compile/nodes/InlineComponent.ts --- a/src/compiler/compile/nodes/InlineComponent.ts +++ b/src/compiler/compile/nodes/InlineComponent.ts @@ -18,6 +18,7 @@ export default class InlineComponent extends Node { bindings: Binding[] = []; handlers:...
diff --git a/test/helpers.ts b/test/helpers.ts --- a/test/helpers.ts +++ b/test/helpers.ts @@ -260,3 +260,11 @@ export function mkdirp(dir) { // do nothing } } + +export function prettyPrintPuppeteerAssertionError(message) { + const match = /Error: Expected "(.+)" to equal "(.+)"/.exec(message); + + if (match) { ...
Implement RFC 13 https://github.com/sveltejs/rfcs/pull/13
Honestly, looks bad. It will wrap my component markup with extra `div` which will break selectors like `a > b`. I will just not use this feature. @zamanruhy The RFC addresses this, essentially it comes down to using `display: contents`. Specifically this bit explains it: > display: contents essentially removes the w...
2021-04-24 05:00:03+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', '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 hydration)', 'runtime ...
['ssr component-css-custom-properties', 'ssr component-css-custom-properties-dynamic']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Feature
false
false
false
true
3
1
4
false
false
["src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts->program->class_declaration:InlineComponentWrapper->method_definition:render", "src/compiler/compile/nodes/InlineComponent.ts->program->class_declaration:InlineComponent", "src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts->program->cla...
sveltejs/svelte
6,275
sveltejs__svelte-6275
['6274']
b3a642c3d30cbffe962c0df42f3766ce718506cc
diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -216,7 +216,7 @@ export function claim_text(nodes, data) { const node = nodes[i]; if (node.nodeType === 3) { node.data = '' + data; - return nodes.shift(); + return...
diff --git a/test/hydration/samples/claim-text/Component.svelte b/test/hydration/samples/claim-text/Component.svelte new file mode 100644 --- /dev/null +++ b/test/hydration/samples/claim-text/Component.svelte @@ -0,0 +1,5 @@ +<svelte:head> + <title>Title</title> +</svelte:head> + +<main>There should be one</main> diff ...
Duplication of elements on hydration in Svelte 3.38.0 **Describe the bug** Under certain conditions, hydration appends elements to the DOM alongside prerendered parts, leading to element duplication. This seems to specifically affect routes/components using `svelte:head` and depends heavily on components’ structure. T...
I just upgraded my project from version 71 to 94 and met the same issue. I can confirm that it does no longer occur when I remove the `<svelte:head>` from my page components. edit: downgrading to svelte@3.37.0 seems to fix the issue as well. Experiencing the same issue while using with `<svelte:head>`. @intrikate ...
2021-05-01 15:03:00+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', '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 hydration)', 'runtime ...
['hydration claim-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/runtime/internal/dom.ts->program->function_declaration:claim_text"]
sveltejs/svelte
6,289
sveltejs__svelte-6289
['6188']
ff6ce725bfdabba908690f4bae0b06a3f26da881
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 @@ -394,6 +394,26 @@ export default class Element extends Node { const href_attribute = attribute_map.get('href') || attribute_map.get('x...
diff --git a/test/validator/samples/security-anchor-rel-noreferrer/input.svelte b/test/validator/samples/security-anchor-rel-noreferrer/input.svelte new file mode 100644 --- /dev/null +++ b/test/validator/samples/security-anchor-rel-noreferrer/input.svelte @@ -0,0 +1,31 @@ +<a href="https://svelte.dev" target="_blank">...
Security hints **Is your feature request related to a problem? Please describe.** Svelte is really helpful for giving hints such as a11y (eg: `A11y: '' is not a valid href attribute`). My point here would be to do kind of the same thing with basic security rules. For instance, one of a security rule would be t...
null
2021-05-03 18:02:03+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['validate security-anchor-rel-noreferrer']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Security
false
true
false
false
1
0
1
true
false
["src/compiler/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:validate_special_cases"]
sveltejs/svelte
6,300
sveltejs__svelte-6300
['6299']
086cff22721f9589981ba9f6ec0bedc861e25623
diff --git a/src/compiler/parse/state/tag.ts b/src/compiler/parse/state/tag.ts --- a/src/compiler/parse/state/tag.ts +++ b/src/compiler/parse/state/tag.ts @@ -378,6 +378,13 @@ function read_attribute(parser: Parser, unique_names: Set<string>) { if (type) { const [directive_name, ...modifiers] = name.slice(colon_in...
diff --git a/test/parser/samples/error-empty-classname-binding/error.json b/test/parser/samples/error-empty-classname-binding/error.json --- a/test/parser/samples/error-empty-classname-binding/error.json +++ b/test/parser/samples/error-empty-classname-binding/error.json @@ -1,6 +1,6 @@ { - "code": "invalid-class-direc...
No compile errors when passing empty directive names Looks like I can pass empty directive names which can generate invalid JS code without any compilation errors or with unclear errors For example in actions ```svelte <element use: /> ```` Parts of generated code looks like: ```javascript dispose = action_des...
null
2021-05-04 20:17:42+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime ...
['parse error-empty-classname-binding', 'parse error-empty-directive-name']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/parse/state/tag.ts->program->function_declaration:read_attribute"]
sveltejs/svelte
6,314
sveltejs__svelte-6314
['5394']
716d54571ec868f33517cfb47a26b3f328f77232
diff --git a/src/compiler/compile/render_dom/wrappers/Slot.ts b/src/compiler/compile/render_dom/wrappers/Slot.ts --- a/src/compiler/compile/render_dom/wrappers/Slot.ts +++ b/src/compiler/compile/render_dom/wrappers/Slot.ts @@ -107,7 +107,7 @@ export default class SlotWrapper extends Wrapper { if (spread_dynamic_dep...
diff --git a/test/runtime/samples/transition-js-slot-2/_config.js b/test/runtime/samples/transition-js-slot-2/_config.js --- a/test/runtime/samples/transition-js-slot-2/_config.js +++ b/test/runtime/samples/transition-js-slot-2/_config.js @@ -1,3 +1,4 @@ +// cancelled the transition halfway export default { html: ` ...
Slot having stale state if transition is reversed midway **Describe the bug** Slot content seems to have stale state if the component were to be destroyed, but the transition was reversed midway. **To Reproduce** [REPL](https://svelte.dev/repl/405911d112e040818e26e30f37c61b8d?version=3.25.0). I apologize if the...
I think I am having the same problem: - Go [here](https://svelte-materialify.vercel.app/getting-started/installation/) - Then click the closed navigation groups on the left side multiple times quickly.
2021-05-09 09: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 ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-block-else', 'runtime transition-js-each-block-out...
['runtime transition-js-slot-5-cancelled-overflow (with hydration from ssr rendered html)', 'runtime transition-js-slot-7-spread-cancelled-overflow ', 'runtime transition-js-slot-4-cancelled (with hydration from ssr rendered html)', 'runtime transition-js-slot-4-cancelled (with hydration)', 'runtime transition-js-slot-...
null
. /usr/local/nvm/nvm.sh && 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:update_slot_base", "src/runtime/internal/utils.ts->program->function_declaration:update_slot", "src/compiler/compile/render_dom/wrappers/Slot.ts->program->class_declaration:SlotWrapper->method_definition:render", "src/runtime/internal/utils.ts->program->fun...
sveltejs/svelte
6,395
sveltejs__svelte-6395
['4308']
17c5402e311d7224aa8c11d979c9b32cb950883f
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 @@ -1,7 +1,7 @@ import { add_render_callback, flush, schedule_update, dirty_components } from './scheduler'; import { current_component, set_current_compon...
diff --git a/test/hydration/samples/head-meta-hydrate-duplicate/_after_head.html b/test/hydration/samples/head-meta-hydrate-duplicate/_after_head.html --- a/test/hydration/samples/head-meta-hydrate-duplicate/_after_head.html +++ b/test/hydration/samples/head-meta-hydrate-duplicate/_after_head.html @@ -1,4 +1,4 @@ -<tit...
Better hydration **Is your feature request related to a problem? Please describe.** Currently hydration is very expensive, it searches for the correct node type clears it and re-adds the attributes and finally unmounts and remounts the DOM node by calling insertBefore/append This causes iframes to reload. In the cur...
If anyone else is blocked by the iframes ssr/hydration problems or really cares about hydration speed, I'm currently maintaining a fork https://github.com/wix-incubator/wix-svelte which you can use directly just point your package.json "svelte": "ssh://git@github.com:wix-incubator/wix-svelte.git#master" (or hard code ...
2021-06-09 21:58: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 ', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-block-else', 'runtime transition-js-each-block-out...
['hydration head-meta-hydrate-duplicate']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Refactoring
false
true
false
false
11
0
11
false
false
["src/runtime/internal/Component.ts->program->function_declaration:init", "src/runtime/internal/dom.ts->program->function_declaration:upper_bound", "src/runtime/internal/dom.ts->program->function_declaration:insert", "src/runtime/internal/dom.ts->program->function_declaration:claim_text", "src/runtime/internal/dom.ts->...
sveltejs/svelte
6,414
sveltejs__svelte-6414
['6386']
17c5402e311d7224aa8c11d979c9b32cb950883f
diff --git a/src/compiler/compile/render_dom/Renderer.ts b/src/compiler/compile/render_dom/Renderer.ts --- a/src/compiler/compile/render_dom/Renderer.ts +++ b/src/compiler/compile/render_dom/Renderer.ts @@ -3,7 +3,7 @@ import { CompileOptions, Var } from '../../interfaces'; import Component from '../Component'; impor...
diff --git a/test/runtime/samples/bitmask-overflow-if-2/_config.js b/test/runtime/samples/bitmask-overflow-if-2/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/bitmask-overflow-if-2/_config.js @@ -0,0 +1,23 @@ +// `bitmask-overflow-if` tests the case where the if condition is made of first 32 v...
Slot prop not update when transition finished **Describe the bug** If a transition happens on an element that contains a slot which has a prop, the slot prop does not properly update if it is rendered again immediately after the transition ends. **To Reproduce** https://svelte.dev/repl/773209884de04140b5e07e1cff49...
Did you try like this? ``` function blink() { transitioning = true; setTimeout(() => { test = 'bar1'; transitioning = false; }, 500); // if timeout value > duration time and slot prop `test` value will be 'bar'. } ``` @kaisermann Yes, it is my solution currently. It is a workaround and doesn't solve the...
2021-06-20 14:51:59+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-block-else', 'runtime transition-js-each-block-out...
['runtime transition-js-slot-3 ', 'runtime bitmask-overflow-if-2 (with hydration from ssr rendered html)', 'runtime transition-js-slot-fallback ', 'runtime transition-js-slot-fallback (with hydration from ssr rendered html)', 'runtime transition-js-slot-fallback (with hydration)', 'runtime bitmask-overflow-if-2 ', 'run...
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
8
2
10
false
false
["src/compiler/compile/render_dom/Renderer.ts->program->class_declaration:Renderer->method_definition:get_initial_dirty->method_definition:type", "src/compiler/compile/render_dom/Renderer.ts->program->class_declaration:Renderer->method_definition:get_initial_dirty->method_definition:elements", "src/compiler/compile/ren...
sveltejs/svelte
6,417
sveltejs__svelte-6417
['6310']
17c5402e311d7224aa8c11d979c9b32cb950883f
diff --git a/src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts b/src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts --- a/src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts @@ -20,7 +20,7 @@ export default ...
diff --git a/test/runtime/samples/component-events-this/Inner.svelte b/test/runtime/samples/component-events-this/Inner.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-events-this/Inner.svelte @@ -0,0 +1,7 @@ +<script> + import { createEventDispatcher } from 'svelte'; + const dispatch =...
event handlers are unbound when called with forwarded DOM events from child components **Describe the bug** `this` is undefined in event handlers, when handling a DOM event which has been forwarded from a child component **Logs** See repro **To Reproduce** The bug can be easily reproduced in the [DOM Event For...
I'm not an expert here, but here's what I'm seeing: In the `tick` example you're binding the event directly on `<textarea>` so you know what's happening and `this` behaves as expected. But I agree that it shouldn't use `this` there since it's also common to use arrow functions as event handlers and I personally alwa...
2021-06-20 16:59:43+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-block-else', 'runtime transition-js-each-block-out...
['runtime component-events-this (with hydration)', 'runtime component-events-this (with hydration from ssr rendered html)', 'runtime component-events-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
2
0
2
false
false
["src/runtime/internal/lifecycle.ts->program->function_declaration:bubble", "src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts->program->class_declaration:EventHandlerWrapper->method_definition:constructor"]
sveltejs/svelte
6,424
sveltejs__svelte-6424
['6276']
17c5402e311d7224aa8c11d979c9b32cb950883f
diff --git a/src/compiler/parse/state/tag.ts b/src/compiler/parse/state/tag.ts --- a/src/compiler/parse/state/tag.ts +++ b/src/compiler/parse/state/tag.ts @@ -221,9 +221,9 @@ export default function tag(parser: Parser) { element.children = read_sequence( parser, () => - parser.template.slice(parser.index,...
diff --git a/test/parser/samples/textarea-end-tag/input.svelte b/test/parser/samples/textarea-end-tag/input.svelte new file mode 100644 --- /dev/null +++ b/test/parser/samples/textarea-end-tag/input.svelte @@ -0,0 +1,12 @@ +<textarea> + <p>not actu </textar ally an element. {foo}</p> +</textare + + +> </textaread >asdf...
</textarea> with the closing angle bracket at a new line gives error **Describe the bug** `</textarea>` with the closing angle bracket at a new line gives error. **Logs** ``` Unexpected end of input (2:1) ``` **To Reproduce** ``` html <textarea>test</textarea > ``` **Expected behavior** Does not giv...
Yeah it would be nice to match browsers' behavior for parsing the end of textareas. I'm not sure what that is exactly though. I always thought that for all browsers it does not matter where the `>` is at, and that is doesn't need to be right after the tag name. Since Prettier does this for all tags I'd be surprised if ...
2021-06-21 15:43:08+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-block-else', 'runtime transition-js-each-block-out...
['parse textarea-end-tag']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/parse/state/tag.ts->program->function_declaration:tag"]
sveltejs/svelte
6,427
sveltejs__svelte-6427
['6092']
17c5402e311d7224aa8c11d979c9b32cb950883f
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 @@ -19,7 +19,7 @@ import { add_event_handler } from '../share...
diff --git a/test/sourcemaps/samples/decoded-sourcemap/_config.js b/test/sourcemaps/samples/decoded-sourcemap/_config.js --- a/test/sourcemaps/samples/decoded-sourcemap/_config.js +++ b/test/sourcemaps/samples/decoded-sourcemap/_config.js @@ -3,7 +3,7 @@ import { magic_string_preprocessor_result, magic_string_replace_a...
Segment-less sourcemap generated for static templates This originally broke source maps with SvelteKit. [A workaround was added to Vite](https://github.com/vitejs/vite/pull/2441), but we still don't get source maps for static files. Svelte generates a segment-less sourcemap when there's no dynamic content in the tem...
<details> <summary>how NOT to reproduce</summary> ```svelte <div> <button onclick="console.log('this is App.svelte line 2')">click me</button> </div> ``` actual result ``` this is App.svelte line 2 (index):19 ``` ~~probably this should say `App.svelte:2`~~ </details> <details> ...
2021-06-22 02:59:43+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-block-else', 'runtime transition-js-each-block-out...
['sourcemaps sourcemap-offsets', 'sourcemaps external', 'sourcemaps markup', 'sourcemaps decoded-sourcemap', 'sourcemaps sourcemap-basename']
null
. /usr/local/nvm/nvm.sh && 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/Text.ts->program->class_declaration:TextWrapper->method_definition:render", "src/compiler/compile/render_dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:render"]
sveltejs/svelte
6,428
sveltejs__svelte-6428
['5907']
17c5402e311d7224aa8c11d979c9b32cb950883f
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 @@ -143,6 +143,19 @@ export default class Selector { }); } } + + for (const block of this.blocks) { + for (const selector of block...
diff --git a/test/validator/samples/css-invalid-global-selector/errors.json b/test/validator/samples/css-invalid-global-selector/errors.json new file mode 100644 --- /dev/null +++ b/test/validator/samples/css-invalid-global-selector/errors.json @@ -0,0 +1,17 @@ +[ + { + "code": "css-invalid-global-selector", + "messa...
:global applied to multiple selectors should be an error **Describe the bug** Prefixing a css global to give it scope only scopes the first selector. **To Reproduce** https://svelte.dev/repl/aaed36026d014e34b45aedef9630b55f?version=3.31.2 **Expected behavior** ```css article.svelte-1nz7a1b div.svelte-1nz7a1b ...
Honestly I'm thinking that `:global(h1, h2, h3)` should probably be a compiler error. It's not really clear to me what it should mean. I don't think `article div :global(h1, h2, h3)` should be a shortcut for `article div :global(h1), article div :global(h2), article div :global(h3)`, which is what this issue seems to b...
2021-06-22 07:26: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 ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-block-else', 'runtime transition-js-each-block-out...
['validate css-invalid-global-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:validate"]
sveltejs/svelte
6,429
sveltejs__svelte-6429
['5756']
17c5402e311d7224aa8c11d979c9b32cb950883f
diff --git a/src/compiler/compile/render_ssr/handlers/Element.ts b/src/compiler/compile/render_ssr/handlers/Element.ts --- a/src/compiler/compile/render_ssr/handlers/Element.ts +++ b/src/compiler/compile/render_ssr/handlers/Element.ts @@ -41,7 +41,7 @@ export default function(node: Element, renderer: Renderer, options:...
diff --git a/test/server-side-rendering/samples/attribute-escape-quotes-spread-2/_expected.html b/test/server-side-rendering/samples/attribute-escape-quotes-spread-2/_expected.html new file mode 100644 --- /dev/null +++ b/test/server-side-rendering/samples/attribute-escape-quotes-spread-2/_expected.html @@ -0,0 +1,5 @@...
Null-valued attributes are rendered initially when restProps are involved **Describe the bug** Even though Svelte's take on attributes is that it doesn't add them when their value is `null`, Sapper seems to disrespect this on initial server-side rendering for components that include `$$restProps`. This leads to nasty ...
Transferring this to the Svelte repo, as this is a Svelte bug. The SSR version of a component with `<div {id} {...foo}/>` contains: ```js const App = create_ssr_component(($$result, $$props, $$bindings, slots) => { return `<div${spread([{ id: escape(id) }, foo])}></div>`; }); ``` `escape(null)` is evaluat...
2021-06-22 08:49:49+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-block-else', 'runtime transition-js-each-block-out...
['ssr attribute-spread-with-null']
null
. /usr/local/nvm/nvm.sh && 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/internal/ssr.ts->program->function_declaration:spread", "src/runtime/internal/ssr.ts->program->function_declaration:escape_attribute_value", "src/runtime/internal/ssr.ts->program->function_declaration:escape_object"]
sveltejs/svelte
6,435
sveltejs__svelte-6435
['6434']
716d54571ec868f33517cfb47a26b3f328f77232
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 @@ -147,7 +147,7 @@ export default class Selector { for (const block of this.blocks) { for (const selector of block.selectors) { if (...
diff --git a/test/validator/samples/css-invalid-global-selector-2/errors.json b/test/validator/samples/css-invalid-global-selector-2/errors.json new file mode 100644 --- /dev/null +++ b/test/validator/samples/css-invalid-global-selector-2/errors.json @@ -0,0 +1,17 @@ +[ + { + "code": "css-invalid-global-selector", + ...
:where breaks :global in 3.38.3 **Describe the bug** Using multiple selectors in `:where` (https://web.dev/css-is-and-where/) breaks :global in 3.38.3 and not 3.38.2. **Logs** ``` :global(...) must contain a single selector (2:0) ``` **To Reproduce** In 3.38.2: https://svelte.dev/repl/564fb17fee1f491c89986...
null
2021-06-23 17:03:46+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-block-else', 'runtime transition-js-each-block-out...
['validate css-invalid-global-selector-2', 'validate css-invalid-global-selector-3']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/css/Selector.ts->program->class_declaration:Selector->method_definition:validate"]
sveltejs/svelte
6,445
sveltejs__svelte-6445
['6444']
2c488f4d61bb6c8d9d6c86f0c735cf81cb05bb3a
diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -34,54 +34,54 @@ function upper_bound(low: number, high: number, key: (index: number) => number, function init_hydrate(target: NodeEx) { if (target.hydrate_init) return; tar...
diff --git a/test/runtime/samples/each-block-keyed-changed/_config.js b/test/runtime/samples/each-block-keyed-changed/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/each-block-keyed-changed/_config.js @@ -0,0 +1,13 @@ +export default { + props: { + titles: [{ name: 'a' }, { name: 'b' }, { nam...
There is a problem with keyed each. **Describe the bug** There is a problem with keyed each. When the position of the array is changed, the position of the element is strange. **To Reproduce** To help us help you, if you've found a bug please consider the following: https://svelte.dev/repl/9d71f9bdfec1443bb7...
null
2021-06-25 11:57:39+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-block-else', 'runtime transition-js-each-block-out...
['runtime each-block-keyed-changed (with hydration)', 'runtime each-block-keyed-changed ', 'runtime each-block-keyed-changed (with hydration from ssr rendered html)']
null
. /usr/local/nvm/nvm.sh && 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:claim_node", "src/runtime/internal/dom.ts->program->function_declaration:append", "src/runtime/internal/dom.ts->program->function_declaration:insert", "src/runtime/internal/dom.ts->program->function_declaration:init_hydrate"]
sveltejs/svelte
6,458
sveltejs__svelte-6458
['4551']
b662c7fd41b3b778ea1ae80b0a4d86c239ffcfe7
diff --git a/src/compiler/compile/render_ssr/handlers/Element.ts b/src/compiler/compile/render_ssr/handlers/Element.ts --- a/src/compiler/compile/render_ssr/handlers/Element.ts +++ b/src/compiler/compile/render_ssr/handlers/Element.ts @@ -119,9 +119,11 @@ export default function(node: Element, renderer: Renderer, optio...
diff --git a/test/runtime/samples/apply-directives-in-order/_config.js b/test/runtime/samples/apply-directives-in-order/_config.js --- a/test/runtime/samples/apply-directives-in-order/_config.js +++ b/test/runtime/samples/apply-directives-in-order/_config.js @@ -9,7 +9,7 @@ export default { `, ssrHtml: ` - <inpu...
Input type range bound value 0 is omitted from ssr **Describe the bug** The range element with a bound value 0 is omitted from server side rendering. This leads to the range input jumping(from default location) after client side js takes over. This issue seems to stem from 0 being a falsy value in Javascript. **T...
I guess the issue is located here https://github.com/sveltejs/svelte/blob/a66437b3c15e735139f9afb2ec25e3e1c612cd82/src/compiler/compile/render_ssr/handlers/Element.ts#L125-L127 https://github.com/sveltejs/svelte/blob/a66437b3c15e735139f9afb2ec25e3e1c612cd82/src/runtime/internal/ssr.ts#L130-L132 Would it be eno...
2021-06-27 07:54:13+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['ssr binding-select-initial-value', 'ssr component-binding-store', 'ssr store-invalidation-while-update-2', 'ssr bindings-global-dependency', 'ssr binding-select-late-2', 'ssr each-block-destructured-default-binding', 'ssr binding-select-multiple', 'ssr binding-circular', 'ssr store-invalidation-while-update-1', 'ssr ...
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
true
false
false
false
0
0
0
false
false
[]
sveltejs/svelte
6,470
sveltejs__svelte-6470
['6468']
f757de328ae1524ca27fd0a4ade58da18fcf09c3
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 @@ -610,7 +610,7 @@ class Block { this.selectors.length >= 1 && this.selectors[0].type === 'PseudoClassSelector' && this.selectors[0]...
diff --git a/test/validator/samples/css-invalid-global-placement-3/errors.json b/test/validator/samples/css-invalid-global-placement-3/errors.json new file mode 100644 --- /dev/null +++ b/test/validator/samples/css-invalid-global-placement-3/errors.json @@ -0,0 +1,15 @@ +[{ + "code": "css-invalid-global", + "message": ...
Site won't run with latest version of Svelte ### Describe the bug The site won't run anymore with a recent version of Svelte probably due to https://github.com/sveltejs/svelte/issues/5907 There are at least some errors in `node_modules/@sveltejs/site-kit/components/Blurb.svelte`. Also potentially in this repo ...
null
2021-06-29 06:27:01+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['validate css-invalid-global-placement-3']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/css/Selector.ts->program->class_declaration:Block->method_definition:global"]
sveltejs/svelte
6,494
sveltejs__svelte-6494
['4995']
f2fa7b218676061dd2977d96d75bca1f28fba2e6
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 @@ -71,7 +71,7 @@ export default class Block { get_unique_name: (name: string) => Identifier; has_update_method = false; - ...
diff --git a/test/runtime/samples/autofocus/_config.js b/test/runtime/samples/autofocus/_config.js --- a/test/runtime/samples/autofocus/_config.js +++ b/test/runtime/samples/autofocus/_config.js @@ -2,7 +2,23 @@ export default { html: '', test({ assert, component, target, window }) { - component.visible = true; ...
autofocus HTML attribute not working with curly braces JavaScript expression **Describe the bug** The `autofocus` HTML attribute is not working with curly braces JavaScript expression **Logs** Please include browser console and server logs around the time this bug occurred. **To Reproduce** Check [this repl ...
@opensas can confirm this looks like a bug, but you should also be aware that Svelte is very accessibility focused, and autofocus is an accessibility no-no. Thanks for the reply @antony , I'm aware of svelte accessibility focused (see what I did?) attitude. What would be the best way to handle autofocus in a a11y fr...
2021-07-05 07:36:25+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['runtime autofocus (with hydration)', 'runtime autofocus (with hydration from ssr rendered html)', 'runtime autofocus ']
null
. /usr/local/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/Block.ts->program->class_declaration:Block", "src/compiler/compile/render_dom/wrappers/Element/Attribute.ts->program->class_declaration:AttributeWrapper->method_definition:render", "src/compiler/compile/render_dom/Block.ts->program->class_declaration:Block->method_definition:get_conten...
sveltejs/svelte
6,512
sveltejs__svelte-6512
['6433']
5334f4ad1b12bb1c9ca3eee5d8cd063eea9695e7
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 @@ -661,10 +661,10 @@ export default class ElementWrapper ext...
diff --git a/test/runtime/samples/spread-element-input-select/_config.js b/test/runtime/samples/spread-element-input-select/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/spread-element-input-select/_config.js @@ -0,0 +1,25 @@ +export default { + async test({ assert, component, target, window ...
Select value not correctly displayed, if it has spread attibutes **Describe the bug** The element **Select** does not correctly process special attibute **value** if it has spread attributes. **To Reproduce** [REPL](https://svelte.dev/repl/a0699db0cec64268b7a5be1e4f8c71f0?version=3.38.3) **Expected behavior** ...
null
2021-07-10 10:58:17+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['runtime spread-element-input-select ', 'runtime spread-element-input-select (with hydration)', 'runtime spread-element-input-select (with hydration from ssr rendered html)']
null
. /usr/local/nvm/nvm.sh && 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_spread_attributes"]
sveltejs/svelte
6,514
sveltejs__svelte-6514
['4767']
ebaa891e69c184cf44c0fcd54984ec84d13236fa
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 @@ -47,8 +47,9 @@ export default class Selector { this.local_blocks = this.blocks.slice(0, i); const host_only = this.blocks.length === 1...
diff --git a/test/css/samples/root/_config.js b/test/css/samples/root/_config.js new file mode 100644 --- /dev/null +++ b/test/css/samples/root/_config.js @@ -0,0 +1 @@ +export default {}; diff --git a/test/css/samples/root/expected.css b/test/css/samples/root/expected.css new file mode 100644 --- /dev/null +++ b/test/...
`<meta>` tag get svelte- classname when `:root` selector is defined **Describe the bug** When I used `:root` selector in a svelte component using `<style>`, `<meta>` in `<svelte:head />` tag will get a svelte generated classname. While I can just move `:root` selector to other place, I'm not sure if it's expected b...
> If I'm not mistaken the class will be also applied if no styles are present... Can't confirm from my phone at the moment and will check later. If I removed `:root` class would disappear in `<meta>` though. You are right... 👍 Thank you This issue has been automatically marked as stale because it has not had rece...
2021-07-11 01:19:06+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['css root']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
4
1
5
false
false
["src/compiler/compile/css/Selector.ts->program->class_declaration:Selector->method_definition:constructor", "src/compiler/compile/css/Selector.ts->program->class_declaration:Block", "src/compiler/compile/css/Selector.ts->program->class_declaration:Block->method_definition:constructor", "src/compiler/compile/css/Select...
sveltejs/svelte
6,516
sveltejs__svelte-6516
['6505']
5534b911ea9da16682d6052e641461087661c689
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 @@ -754,7 +754,7 @@ export default class ElementWrapper exten...
diff --git a/test/runtime/samples/transition-css-in-out-in-with-param/_config.js b/test/runtime/samples/transition-css-in-out-in-with-param/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/transition-css-in-out-in-with-param/_config.js @@ -0,0 +1,21 @@ +export default { + test({ assert, componen...
Dynamic properties in transition "in" directive not working ### Describe the bug When the params passed to "in" transition is changed dynamically, the value is not reflected. The values passed to "out" work fine. ### Reproduction https://svelte.dev/repl/ca9e1328264c4f3395d72d786c9aa113?version=3.38.3 ### L...
null
2021-07-11 13:28:01+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['runtime transition-css-in-out-in-with-param ', 'runtime transition-css-in-out-in ', 'runtime transition-css-in-out-in (with hydration)', 'runtime transition-css-in-out-in-with-param (with hydration from ssr rendered html)', 'runtime transition-css-in-out-in-with-param (with hydration)', 'runtime transition-css-in-out...
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:add_transitions"]
sveltejs/svelte
6,523
sveltejs__svelte-6523
['6502']
fdd3d4b4480e77190d1eb83151203334805b7ea3
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 @@ -151,7 +151,7 @@ export default function dom( kind: 'set', key: { type: 'Identifier', name: prop.export_name }, ...
diff --git a/test/runtime/samples/component-binding-accessors/Nested.svelte b/test/runtime/samples/component-binding-accessors/Nested.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-binding-accessors/Nested.svelte @@ -0,0 +1,5 @@ +<script> + export let value; +</script> + +<input bind:val...
Setting a prop with accessors: true is not synchronized with bound values ### Describe the bug When setting a value that is exposed through `accessors: true`, props in other components that are higher up and bound to this prop are not updated accordingly. ### Reproduction Minimal reproduction: https://svelte.dev/...
null
2021-07-13 14:18:49+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['runtime component-binding-accessors ', 'runtime component-binding-accessors (with hydration)', 'runtime component-binding-accessors (with hydration from ssr rendered html)']
null
. /usr/local/nvm/nvm.sh && 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
6,525
sveltejs__svelte-6525
['6462']
33307a54c86daf45aa49f4cfaeef2ab07ff37ed0
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 @@ -272,6 +272,14 @@ export default class Component { } else { let name = node.name.slice(1); + if (compile_options.hydratable) { +...
diff --git a/test/js/samples/hydrated-void-element/expected.js b/test/js/samples/hydrated-void-element/expected.js --- a/test/js/samples/hydrated-void-element/expected.js +++ b/test/js/samples/hydrated-void-element/expected.js @@ -8,7 +8,7 @@ import { detach, element, init, - insert, + insert_hydration, noop, ...
Svelte "hello world" increased by 4.37kB (~59%) between Svelte 3.37.0 and 3.38.0 ### Describe the bug First off, thank you for maintaining Svelte. It's one of my favorite JavaScript frameworks for its ease-of-use, small bundle size, and runtime performance. Unfortunately it seems that the baseline bundle size has i...
Yep I think it would probably make sense to have dumb versions of the claim functions that are used when hydration is not enabled at compile time. I count around 4521 letters in the diff (quite close to 11.79K - 7.42K) with around 1719 characters from comments. So I guess this is the bundle size for debug builds, right...
2021-07-13 14:39:28+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['js src-attribute-check', 'js hydrated-void-element']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Refactoring
false
false
false
true
14
2
16
false
false
["src/runtime/internal/dom.ts->program->class_declaration:HtmlTag->method_definition:m", "src/runtime/internal/dom.ts->program->function_declaration:append_hydration", "src/runtime/internal/dom.ts->program->function_declaration:insert", "src/runtime/internal/dom.ts->program->class_declaration:HtmlTagHydration", "src/ru...
sveltejs/svelte
6,528
sveltejs__svelte-6528
['6447']
52b67a0497baa5d3a84dd1d4ed746f9f236de23d
diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -198,6 +198,24 @@ Checks whether a given `key` has been set in the context of a parent component. </script> ``` +#### `getAllContexts` + +```js +contexts:...
diff --git a/test/runtime/samples/context-api-d/Leaf.svelte b/test/runtime/samples/context-api-d/Leaf.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/context-api-d/Leaf.svelte @@ -0,0 +1,9 @@ +<script> + import { getAllContexts } from 'svelte'; + + const context = getAllContexts(); +</script> + +{#...
Allow getContext() to pass on context as a whole **Is your feature request related to a problem? Please describe.** I want to pass on context to programatically defined components: ```javascript new SomeComponent({target, props, context: ??? }) ``` **Describe the solution you'd like** Allow `getContext` to be...
mentioned in discord, but leaving a note here as well: i think this should be `getAllContexts()` or `getContexts()`, since functions that significantly change their behaviour based on the number of arguments they receive are generally an anti-pattern, I think — they don't tend to stand the test of time in my experience
2021-07-14 01:39:30+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['runtime context-api-d ', 'runtime context-api-d (with hydration)', 'runtime context-api-d (with hydration from ssr rendered html)', 'ssr context-api-d']
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/runtime/internal/lifecycle.ts->program->function_declaration:getAllContexts"]
sveltejs/svelte
6,529
sveltejs__svelte-6529
['5653']
52b67a0497baa5d3a84dd1d4ed746f9f236de23d
diff --git a/src/runtime/internal/utils.ts b/src/runtime/internal/utils.ts --- a/src/runtime/internal/utils.ts +++ b/src/runtime/internal/utils.ts @@ -159,7 +159,7 @@ export function null_to_empty(value) { return value == null ? '' : value; } -export function set_store_value(store, ret, value = ret) { +export func...
diff --git a/test/runtime/samples/store-assignment-updates-destructure/_config.js b/test/runtime/samples/store-assignment-updates-destructure/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/store-assignment-updates-destructure/_config.js @@ -0,0 +1,11 @@ +export default { + html: ` + <div>$use...
Destructuring into a store without rename syntax results in undefined behavior **Describe the bug** Destructuring into a svelte store directly, without typing the prop name in a rename syntax results in undefined behavior. ```js import {writable} from 'svelte/store' let userName1 = writable('') let userName2 = wri...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
2021-07-14 01:47:43+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['runtime store-assignment-updates-destructure (with hydration)', 'ssr store-assignment-updates-destructure', 'runtime store-assignment-updates-destructure (with hydration from ssr rendered html)', 'runtime store-assignment-updates-destructure ']
null
. /usr/local/nvm/nvm.sh && 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/utils.ts->program->function_declaration:set_store_value"]
sveltejs/svelte
6,539
sveltejs__svelte-6539
['6286']
cb189ad0ece180224099e509b1e475bb9e102642
diff --git a/src/compiler/parse/state/tag.ts b/src/compiler/parse/state/tag.ts --- a/src/compiler/parse/state/tag.ts +++ b/src/compiler/parse/state/tag.ts @@ -465,6 +465,15 @@ function get_directive_type(name: string): DirectiveType { function read_attribute_value(parser: Parser) { const quote_mark = parser.eat("'...
diff --git a/test/parser/samples/element-with-attribute-empty-string/input.svelte b/test/parser/samples/element-with-attribute-empty-string/input.svelte new file mode 100644 --- /dev/null +++ b/test/parser/samples/element-with-attribute-empty-string/input.svelte @@ -0,0 +1,2 @@ +<span attr=""></span> +<span attr=''></s...
Parser Attribute value undefined for empty string https://astexplorer.net/#/gist/30071e5e2620f2d0e2e38f54cb7350b8/a5398ab81434679120e3d97c516bba48143bc3c5 ```svelte <input foo="" /> ``` ```json { "start": 7, "end": 13, "type": "Attribute", "name": "foo", "value": [] } ``` Unexpected : `value` is ...
null
2021-07-18 14:20:19+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['parse element-with-attribute-empty-string']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/parse/state/tag.ts->program->function_declaration:read_sequence"]
sveltejs/svelte
6,542
sveltejs__svelte-6542
['6258']
5534b911ea9da16682d6052e641461087661c689
diff --git a/src/compiler/parse/state/tag.ts b/src/compiler/parse/state/tag.ts --- a/src/compiler/parse/state/tag.ts +++ b/src/compiler/parse/state/tag.ts @@ -487,10 +487,10 @@ function read_sequence(parser: Parser, done: () => boolean): TemplateNode[] { data: null }; - function flush() { + function flush(end: n...
diff --git a/test/parser/samples/attribute-curly-bracket/input.svelte b/test/parser/samples/attribute-curly-bracket/input.svelte new file mode 100644 --- /dev/null +++ b/test/parser/samples/attribute-curly-bracket/input.svelte @@ -0,0 +1 @@ +<input foo=a{1} /> diff --git a/test/parser/samples/attribute-curly-bracket/ou...
Parser wrong positions in attribute values that include mustache tags https://astexplorer.net/#/gist/7493c123a3c10eade136578aa9ebf4c8/6dc1f7f10625232aa5d214091bf3d6769b2e0558 ```svelte <input foo=a{1} /> ``` ```json { "start": 11, "end": 13, "type": "Text", "raw": "a", "data": "a" } ``` Exp...
Correction this happens on every attribute value that has mustache tags, so even `style="color:{color};"` has wrong end position for the first Text node https://astexplorer.net/#/gist/09380864606687886956085fb0442755/e48a32b2ea9a2a3d3fb5116495c30d7c025d87ff
2021-07-19 15:50:47+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['parse attribute-dynamic', 'parse attribute-curly-bracket', 'parse textarea-children', 'parse textarea-end-tag']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/parse/state/tag.ts->program->function_declaration:read_sequence"]
sveltejs/svelte
6,556
sveltejs__svelte-6556
['6555']
b2260bc2e3dbfe4bf5b9c6c1705aa4e3daf6120f
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 @@ -388,9 +388,11 @@ export default class ElementWrapper exte...
diff --git a/test/js/samples/hydrated-void-svg-element/_config.js b/test/js/samples/hydrated-void-svg-element/_config.js new file mode 100644 --- /dev/null +++ b/test/js/samples/hydrated-void-svg-element/_config.js @@ -0,0 +1,5 @@ +export default { + options: { + hydratable: true + } +}; diff --git a/test/js/samples/h...
`svg_element` function is output even if no svg element in a component ### Describe the problem when `hydratable: true`, `svg_element` function is output even if no svg element in a component. For example, if you have a simple component like the following: ```html <main> <h1>Hello world!</h1> </main> ``` ...
null
2021-07-22 06:29:51+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['js hydrated-void-svg-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
Refactoring
false
true
false
false
4
0
4
false
false
["src/runtime/internal/dom.ts->program->function_declaration:claim_element_base", "src/compiler/compile/render_dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:get_claim_statement", "src/runtime/internal/dom.ts->program->function_declaration:claim_element", "src/runtime/intern...
sveltejs/svelte
6,559
sveltejs__svelte-6559
['6557']
b2260bc2e3dbfe4bf5b9c6c1705aa4e3daf6120f
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 @@ -666,8 +666,17 @@ export default class Component { this.node_for_declaration.set(name, node); }); - globals.forEach((node, name) => { + // NOTE...
diff --git a/test/runtime/samples/store-auto-subscribe-in-reactive-declaration-2/App.svelte b/test/runtime/samples/store-auto-subscribe-in-reactive-declaration-2/App.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/store-auto-subscribe-in-reactive-declaration-2/App.svelte @@ -0,0 +1,8 @@ +<script> +...
Reactivity / store regression in 3.39.0 ### Describe the bug Hi ! I noticed a regression from the 3.38.3 to the 3.39.0. When a store is defined inside an object, and given to a child component, this one is undefined if used with the $ sign in the script section. See the simple REPL for a better explanation 😃 ...
null
2021-07-22 14:07:06+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['runtime store-auto-subscribe-in-reactive-declaration-2 ', 'runtime store-auto-subscribe-in-reactive-declaration-2 (with hydration from ssr rendered html)', 'runtime store-auto-subscribe-in-reactive-declaration-2 (with hydration)', 'ssr store-auto-subscribe-in-reactive-declaration-2']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:walk_instance_js_pre_template"]
sveltejs/svelte
6,560
sveltejs__svelte-6560
['6550']
365b5e300cf44aac4dd5170fab3287071de6f0e8
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 @@ -278,14 +278,12 @@ function block_might_apply_to_node(block: Block, node: Element): BlockAppliesToN return BlockAppliesToNode.NotPossible;...
diff --git a/test/css/samples/global-with-child-combinator/_config.js b/test/css/samples/global-with-child-combinator/_config.js new file mode 100644 --- /dev/null +++ b/test/css/samples/global-with-child-combinator/_config.js @@ -0,0 +1,3 @@ +export default { + warnings: [] +}; diff --git a/test/css/samples/global-wit...
compiler sometimes sometimes tries to encapsulate :global(...) ### Describe the bug There's a bug in how some css selectors are compiled, such that the class that the compiler adds (to scope things to the module) is prepended to the contents of `:global(...)`. ### Reproduction ```css :global(div) > div { color: r...
null
2021-07-22 15:01:28+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['css global-with-child-combinator']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/css/Selector.ts->program->function_declaration:block_might_apply_to_node"]
sveltejs/svelte
6,563
sveltejs__svelte-6563
['6550']
63f592e7133bbb5730ceb61ca8184854fed52edb
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 @@ -227,7 +227,8 @@ function apply_selector(blocks: Block[], node: Element, to_encapsulate: Array<{ return false; } else if (block.combi...
diff --git a/test/css/samples/global-with-child-combinator-2/_config.js b/test/css/samples/global-with-child-combinator-2/_config.js new file mode 100644 --- /dev/null +++ b/test/css/samples/global-with-child-combinator-2/_config.js @@ -0,0 +1,27 @@ +export default { + warnings: [ + { + code: 'css-unused-selector', ...
compiler sometimes sometimes tries to encapsulate :global(...) ### Describe the bug There's a bug in how some css selectors are compiled, such that the class that the compiler adds (to scope things to the module) is prepended to the contents of `:global(...)`. ### Reproduction ```css :global(div) > div { color: r...
https://svelte.dev/repl/9b67838a3ad04a52b3a21255f84051c2?version=3.40.2 Hm. In 3.40.2, correct-looking CSS is getting generated, but the scoping class is only getting added to the outer div in the DOM and not the inner one, so the text still isn't red. @tanhauhau Do you think there's anything that can reasonably be ...
2021-07-24 02:35: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 ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['css global-with-child-combinator', 'css global-with-child-combinator-3']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/css/Selector.ts->program->function_declaration:apply_selector"]
sveltejs/svelte
6,564
sveltejs__svelte-6564
['6270']
63f592e7133bbb5730ceb61ca8184854fed52edb
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 @@ -290,16 +290,24 @@ export default function mustache(parser: Parser) { const await_block_shorthand = type === 'AwaitBlock' && parser.eat('...
diff --git a/test/runtime/samples/await-catch-no-expression/_config.js b/test/runtime/samples/await-catch-no-expression/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/await-catch-no-expression/_config.js @@ -0,0 +1,47 @@ +let fulfil; + +let thePromise = new Promise(f => { + fulfil = f; +}); + ...
feature request: `{#await promise then}` <!-- If you'd like to propose an implementation for a large new feature or change then please create an RFC: https://github.com/sveltejs/rfcs --> **Is your feature request related to a problem? Please describe.** If you have a promise whose resolve value you don't care ab...
A thought on the semantics of this, I think `{#await promise}` would make more sense than `{#await promise then}`. The `then` here doesn't have any significance in this case and could be omitted. I'm pretty sure we need the `then`, because without it Svelte would interpret it as when the promise is pending. I don't thi...
2021-07-24 03:17:12+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['ssr await-catch-no-expression', 'runtime await-then-no-expression (with hydration from ssr rendered html)', 'ssr await-then-no-expression', 'runtime await-then-no-expression (with hydration)', 'runtime await-catch-no-expression (with hydration)', 'runtime await-then-no-expression ', 'runtime await-catch-no-expression...
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Feature
false
true
false
false
1
0
1
true
false
["src/compiler/parse/state/mustache.ts->program->function_declaration:mustache"]
sveltejs/svelte
6,570
sveltejs__svelte-6570
['6567']
63f592e7133bbb5730ceb61ca8184854fed52edb
diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -134,9 +134,9 @@ export function append_styles( style_sheet_id: string, styles: string ) { - const append_styles_to = get_root_for_styles(target); + const append_styles_to =...
diff --git a/test/runtime/samples/target-dom-detached/App.svelte b/test/runtime/samples/target-dom-detached/App.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/target-dom-detached/App.svelte @@ -0,0 +1,11 @@ +<script> + let name = 'World'; +</script> + +<div>Hello {name}</div> + +<style> + div { + ...
Regression introduced in PR #5870 ### Describe the bug Initializing a component into an unmounted div throws ``` Uncaught TypeError: _a.getElementById is not a function ``` ### Reproduction https://svelte.dev/repl/2106c33509344d6784617400c312893d?version=3.40.2 Click on "Hello World" h1. works in v3.39 ...
I think this might be a component resolution issue when a component is loaded dynamically. I'm getting this error in dev (but not build) after upgrading to Svelte 3.40.2 in the svelte/kit project ``` Error: ENOENT: no such file or directory, open '/src/components/NavBar/src/components/NavBar/NavBar.svelte' ``` ...
2021-07-25 12:39:25+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['runtime transition-js-each-else-block-intro (with hydration from ssr rendered html)', 'runtime window-event-context ', 'runtime transition-js-each-block-outro ', 'runtime transition-js-each-block-intro (with hydration)', 'runtime transition-js-each-else-block-intro-outro (with hydration from ssr rendered html)', 'run...
null
. /usr/local/nvm/nvm.sh && 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/dom.ts->program->function_declaration:append_styles", "src/runtime/internal/style_manager.ts->program->function_declaration:create_rule", "src/runtime/internal/dom.ts->program->function_declaration:append_empty_stylesheet", "src/runtime/internal/dom.ts->program->function_declaration:get_root_for_...
sveltejs/svelte
6,574
sveltejs__svelte-6574
['2214']
63f592e7133bbb5730ceb61ca8184854fed52edb
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 @@ -24,7 +24,7 @@ import TemplateScope from './nodes/shared/TemplateScope'; import fuzzymatch from '../utils/fuzzymatch'; import get_object from './utils/g...
diff --git a/test/js/samples/export-from-accessors/_config.js b/test/js/samples/export-from-accessors/_config.js new file mode 100644 --- /dev/null +++ b/test/js/samples/export-from-accessors/_config.js @@ -0,0 +1,5 @@ +export default { + options: { + accessors: true + } +}; diff --git a/test/js/samples/export-from-ac...
`export from` generates wrong code ```html <script> export { a } from 'b'; </script> ``` That should yield the same result as this: ```html <script> import { a } from 'b'; export { a }; </script> ``` But it doesn’t include the necessary `import`.
There are also some issues with the same code in a module script: ```html <script context='module'> export { a } from 'b'; </script> ``` In this case, the export could probably pass through unchanged in the compiled component. It is instead for some reason defining `a` as a read-only prop on the _instance_, ...
2021-07-26 04:09:48+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['runtime export-from (with hydration)', 'runtime export-from ', 'js export-from-accessors', 'runtime export-from (with hydration from ssr rendered html)', 'js export-from', 'js export-from-cjs', 'ssr export-from']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
8
1
9
false
false
["src/compiler/compile/create_module.ts->program->function_declaration:cjs", "src/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:extract_exports", "src/compiler/compile/create_module.ts->program->function_declaration:create_module", "src/compiler/compile/render_dom/index.ts->prog...
sveltejs/svelte
6,578
sveltejs__svelte-6578
['5612']
520b4751dcda44626fa35d062ed603f8b3394717
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 @@ -24,10 +24,10 @@ import TemplateScope from './nodes/shared/TemplateScope'; import fuzzymatch from '../utils/fuzzymatch'; import get_object from './utils...
diff --git a/test/runtime/samples/destructured-props-1/A.svelte b/test/runtime/samples/destructured-props-1/A.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/destructured-props-1/A.svelte @@ -0,0 +1,24 @@ +<script> + import { writable } from 'svelte/store'; + + const THING = { a: 1, b: { c: 2, d:...
Object destructuring when prop is exported <!-- If you'd like to propose an implementation for a large new feature or change then please create an RFC: https://github.com/sveltejs/rfcs --> **Describe the solution you'd like** ```js const THING = {propName: 'lol'}; export let {propName} = THING; ``` **How...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
2021-07-27 05:48:07+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['runtime destructured-props-1 (with hydration from ssr rendered html)', 'ssr destructured-props-1', 'runtime destructured-props-1 (with hydration)', 'runtime destructured-props-3 (with hydration)', 'runtime destructured-props-1 ', 'ssr destructured-props-3', 'runtime destructured-props-3 ', 'runtime destructured-props...
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Feature
false
true
false
false
5
0
5
false
false
["src/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:rewrite_props->method_definition:enter->function_declaration:add_new_props", "src/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:rewrite_props->method_definition:enter", "src/compiler/com...
sveltejs/svelte
6,580
sveltejs__svelte-6580
['6575']
4d677d56433b3ebb6d032aed86201f86323bfdcd
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 @@ -86,8 +86,9 @@ export default class Attrib...
diff --git a/test/js/samples/src-attribute-check-in-foreign/_config.js b/test/js/samples/src-attribute-check-in-foreign/_config.js new file mode 100644 --- /dev/null +++ b/test/js/samples/src-attribute-check-in-foreign/_config.js @@ -0,0 +1,5 @@ +export default { + options: { + hydratable: true + } +}; diff --git a/te...
[svelte-native] broken custom components with 'src' attribute ### Describe the bug This commit https://github.com/sveltejs/svelte/commit/ecbd96af95eddf7d53d24fa78aeb5818f2cf71b9 broke [svelte-native](https://svelte-native.technology/). The reason is that we dont have `a` element. I think the handle of `src` attribut...
Yeah this sounds reasonable. I think it would make sense to add a check to https://github.com/sveltejs/svelte/blob/71c29bbf3599a93d55667aa5acff1675fd395679/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts#L133 that `this.parent.node.namespace !== namespaces.foreign`. @Conduitry i was wondering if should no...
2021-07-27 09:05:45+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['js src-attribute-check-in-foreign', 'js src-attribute-check-in-svg']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
2
0
2
false
false
["src/runtime/internal/dom.ts->program->function_declaration:get_root_for_style", "src/compiler/compile/render_dom/wrappers/Element/Attribute.ts->program->class_declaration:AttributeWrapper->method_definition:constructor"]
sveltejs/svelte
6,583
sveltejs__svelte-6583
['4457']
0f94c890f5fde899c40f2be05bce8e87579f26f3
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 @@ -121,7 +121,7 @@ export default function dom( const accessors = []; const not_equal = component.component_options.immuta...
diff --git a/test/js/samples/capture-inject-state/expected.js b/test/js/samples/capture-inject-state/expected.js --- a/test/js/samples/capture-inject-state/expected.js +++ b/test/js/samples/capture-inject-state/expected.js @@ -113,6 +113,17 @@ function instance($$self, $$props, $$invalidate) { let { alias: realName }...
"x was created without expected prop y" false alert with binding when prop = undefined https://svelte.dev/repl/65985a2e42fe4b899a379750fe609447?version=3.19.1 ```html <script> import Component from './Component.svelte' let value = undefined </script> <Component bind:value /> ``` `<Component> was created wi...
I think this is not a bug, as `let value = undefined;` is the same as `let value;`. Maybe we should support optional props. Same here. This is very annoying to see warnings like these (and [these](https://github.com/sveltejs/svelte/issues/4652)). I had this code export let selection; And got these warni...
2021-07-27 14:24:43+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['js debug-foo-bar-baz-things', 'runtime dev-warning-missing-data-component-bind (with hydration)', 'js capture-inject-state', 'js debug-empty', 'runtime dev-warning-missing-data-component-bind ', 'runtime dev-warning-missing-data-component-bind (with hydration from ssr rendered html)', 'js debug-foo', 'js dev-warning-...
null
. /usr/local/nvm/nvm.sh && 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
6,602
sveltejs__svelte-6602
['6561']
c25789a25ecece4f415bd0e5d73ec26e90fb842a
diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -185,7 +185,7 @@ export function append_hydration(target: NodeEx, node: NodeEx) { } else { target.actual_end_child = node.nextSibling; } - } else if (node.parentNode !=...
diff --git a/test/runtime/samples/key-block-post-hydrate/_config.js b/test/runtime/samples/key-block-post-hydrate/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/key-block-post-hydrate/_config.js @@ -0,0 +1,19 @@ +export default { + html: ` + <div> + <div><span class="name">item 1</span><span>s...
Starting with v3.39.0 sorting a keyed each block messes up the DOM ### Describe the bug I have a keyed each block displaying items. These items can sorted by two different criterias, whenever I resort the items, the DOM of the individual items is changed in a strange way. Div elements within the items are displayed ou...
Some more info. I can confirm that the elements wrongly placed after sorting are conditionally rendered. If I comment out the if around the title, the problem is fixed, for the title at least. There's still problems with other elements though. <img width="544" alt="Screen Shot 2021-07-23 at 09 18 08" src="https://us...
2021-07-31 19:56:55+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['runtime key-block-post-hydrate (with hydration from ssr rendered html)', 'runtime key-block-post-hydrate (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/dom.ts->program->function_declaration:append_hydration"]
sveltejs/svelte
6,607
sveltejs__svelte-6607
['6606', '6606']
ff6ce725bfdabba908690f4bae0b06a3f26da881
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 @@ -1310,7 +1310,7 @@ export default class Component { if (variable) { variable.is_reactive_dependency = true; - if (variable.mo...
diff --git a/test/validator/samples/reactive-module-const-variable/input.svelte b/test/validator/samples/reactive-module-const-variable/input.svelte new file mode 100644 --- /dev/null +++ b/test/validator/samples/reactive-module-const-variable/input.svelte @@ -0,0 +1,9 @@ +<script context="module"> + export const foo =...
{some const} is declared in a module script and will not be reactive ### Describe the bug #5847 added a warning when module variables are used reactively in non-module script. This warning is triggered even if the variable is `const`. (And used reactively together with non-const variables, presumably!) ### Reprodu...
2021-08-01 10:23:35+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['validate reactive-module-const-variable']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:extract_reactive_declarations->method_definition:enter"]
sveltejs/svelte
6,608
sveltejs__svelte-6608
['3163']
ff6ce725bfdabba908690f4bae0b06a3f26da881
diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -1586,7 +1586,9 @@ All except `scrollX` and `scrollY` are readonly. --- -As with `<svelte:window>`, this element allows you t...
diff --git a/test/runtime/samples/action-body/_config.js b/test/runtime/samples/action-body/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/action-body/_config.js @@ -0,0 +1,18 @@ +export default { + html: '<div></div>', + + async test({ assert, target, window }) { + const enter = new window.M...
Actions are not acceptable for <svelte:body /> Seems, we not able to assign actions to `<svelte:body />` element: [REPL](https://svelte.dev/repl/28c1ccc76d8040b18cce57d938823365?version=3.6.3)
The docs are pretty clear that `<svelte:body>` is only for adding events to `document.body`. What would putting an action on `<svelte:body>` even do (that isn't easily accomplished otherwise)? @btk5h In Svelte 3 we don't have custom events anymore (`events: {}` sections in Svelte 2). So, actions are the only way to ...
2021-08-01 11:39:33+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['runtime action-body ', 'runtime action-body (with hydration)', 'runtime action-body (with hydration from ssr rendered html)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
4
1
5
false
false
["src/compiler/compile/render_dom/wrappers/shared/add_actions.ts->program->function_declaration:add_actions", "src/compiler/compile/nodes/Body.ts->program->class_declaration:Body->method_definition:constructor", "src/compiler/compile/nodes/Body.ts->program->class_declaration:Body", "src/compiler/compile/render_dom/wrap...
sveltejs/svelte
6,612
sveltejs__svelte-6612
['6259']
b554e343e893cd5247a6dc1c373ed8f3b4367bd5
diff --git a/src/compiler/parse/errors.ts b/src/compiler/parse/errors.ts --- a/src/compiler/parse/errors.ts +++ b/src/compiler/parse/errors.ts @@ -157,6 +157,10 @@ export default { code: 'missing-component-definition', message: '<svelte:component> must have a \'this\' attribute' }, + missing_attribute_value: { ...
diff --git a/test/parser/samples/attribute-empty-error/error.json b/test/parser/samples/attribute-empty-error/error.json new file mode 100644 --- /dev/null +++ b/test/parser/samples/attribute-empty-error/error.json @@ -0,0 +1,10 @@ +{ + "code": "missing-attribute-value", + "message": "Expected value for the attribute...
Parser unexpected behavior on value-less attribute https://astexplorer.net/#/gist/2bbf556514bd54e799f8b9c836f6b7c9/3896519c24f22c47c49059def15ffed41c709c82 ```svelte <div foo= ></div> ``` ```json { "start": 5, "end": 10, "type": "Attribute", "name": "foo", "value": [] } ``` Unexpected `"value": [...
While browsers will repair this, it is invalid. I think this should be a parser error. It's invalid html according to W3C Validator Error: Attribute value missing.
2021-08-03 04:03:11+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['parse attribute-empty-error', 'parse error-unclosed-attribute-self-close-tag']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/parse/state/tag.ts->program->function_declaration:read_attribute_value"]
sveltejs/svelte
6,613
sveltejs__svelte-6613
['6004']
b554e343e893cd5247a6dc1c373ed8f3b4367bd5
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 @@ -96,6 +96,8 @@ const react_attributes = new Map([ ['htmlFor', 'for'] ]); +const attributes_to_compact_whitespace = ['class', 'style']...
diff --git a/test/js/samples/collapse-element-class-name/expected.js b/test/js/samples/collapse-element-class-name/expected.js new file mode 100644 --- /dev/null +++ b/test/js/samples/collapse-element-class-name/expected.js @@ -0,0 +1,114 @@ +/* generated by Svelte vX.Y.Z */ +import { + SvelteComponent, + assign, + att...
Normalize whitespaces in attribute values during compilation **Is your feature request related to a problem? Please describe.** It's not unusual to want to format your code (in this example particularly your CSS classes) in the following style: ![image](https://user-images.githubusercontent.com/26527405/108560880-a...
As of version 1.3.0, via https://github.com/sveltejs/prettier-plugin-svelte/pull/145, the Prettier plugin no longer formats `class` attributes, to keep in line with Prettier's HTML formatting. I have mixed feelings about whether the compiler should collapse whitespace in `class` attributes. It should definitely not ...
2021-08-03 09:25:22+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['js collapse-element-class-name', 'ssr spread-attributes-white-space']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Feature
false
false
false
true
2
1
3
false
false
["src/compiler/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:optimise", "src/compiler/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:constructor", "src/compiler/compile/nodes/Element.ts->program->class_declaration:Element"]
sveltejs/svelte
6,687
sveltejs__svelte-6687
['6675']
5df60e75a73761e5a4d7feb74955f85ea59fd17c
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 @@ -674,7 +674,7 @@ export default class ElementWrapper exten...
diff --git a/test/runtime/samples/spread-element-select-value-undefined/Select.svelte b/test/runtime/samples/spread-element-select-value-undefined/Select.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/spread-element-select-value-undefined/Select.svelte @@ -0,0 +1,12 @@ +<script> + export let optio...
Selected <select> value disappears in svelte 3.42.2 ### Describe the bug `<select>` elements that should have a selected option appear blank after the update to 3.42.2 This only happens (to me at least) if the select is inside a component that has store props passed to it. I am aware of the change proposed in ...
I just randomly stumbled across this. The disappearing stops once you remove `{...$restProps}`. Maybe this helps in some way Sorry for the wrong mention. Please ignore the mentioned.
2021-08-27 14:41:37+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['runtime spread-element-select-value-undefined ', 'runtime spread-element-select-value-undefined (with hydration)', 'runtime spread-element-select-value-undefined (with hydration from ssr rendered html)']
null
. /usr/local/nvm/nvm.sh && 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_spread_attributes"]
sveltejs/svelte
6,715
sveltejs__svelte-6715
['6699']
4f9a260ab17a9d2a013a72a4bca3bf96947062c0
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 @@ -1044,7 +1044,11 @@ export default class Component { break; case 'AssignmentPattern': - param.left = get_new_name(param...
diff --git a/test/runtime/samples/destructured-assignment-pattern-with-object-pattern/_config.js b/test/runtime/samples/destructured-assignment-pattern-with-object-pattern/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/destructured-assignment-pattern-with-object-pattern/_config.js @@ -0,0 +1,6...
Cannot read property 'subscribable' of undefined ### Describe the bug Hello everyone, Since svelte version 3.41, we cannot compile code containing default values in destruct. Compilation exits with `Cannot read property 'subscribable' of undefined` ```svelte <script> const myObject = {}; const { foo: {...
Probably related to a change in either #6578 or #6574
2021-09-06 14:50:15+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['ssr destructured-assignment-pattern-with-object-pattern', 'runtime destructured-assignment-pattern-with-object-pattern ', 'runtime destructured-assignment-pattern-with-object-pattern (with hydration)', 'runtime destructured-assignment-pattern-with-object-pattern (with hydration from ssr rendered html)']
null
. /usr/local/nvm/nvm.sh && 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:rewrite_props->method_definition:enter->function_declaration:rename_identifiers"]
sveltejs/svelte
6,759
sveltejs__svelte-6759
['6753']
cfc880bb31b09df50ea6619e71afa7f969d2c4d0
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 @@ -124,7 +124,7 @@ export function init(component, options, instance, create_fragment, not_equal, p on_disconnect: [], before_update: [], after_upd...
diff --git a/test/runtime/samples/constructor-prefer-passed-context/ChildComponent.svelte b/test/runtime/samples/constructor-prefer-passed-context/ChildComponent.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/constructor-prefer-passed-context/ChildComponent.svelte @@ -0,0 +1,6 @@ +<script> + impor...
Bug when passing `getAllContexts()` to `new Component({ context })` ### Describe the bug Some contexts are unexplicably removed from the map object when passing it to `new Component()`. From #6447 it seems like this was it's intended usage. ### Reproduction https://svelte.dev/repl/178ba9c6c46a43b9bcd8376262...
It seems like the context you pass in is completely ignored, which is because of this line: https://github.com/sveltejs/svelte/blob/dad02847718084df495c7272c9e0d0f122d99c27/src/runtime/internal/Component.ts#L127 which would need to be changed to give preference to `options.context`, something like this: ` cont...
2021-09-22 20:28:44+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['runtime constructor-prefer-passed-context (with hydration)', 'ssr constructor-prefer-passed-context', 'runtime constructor-prefer-passed-context ', 'runtime constructor-prefer-passed-context (with hydration from ssr rendered html)']
null
. /usr/local/nvm/nvm.sh && 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/Component.ts->program->function_declaration:init", "src/runtime/internal/ssr.ts->program->function_declaration:create_ssr_component->function_declaration:$$render"]
sveltejs/svelte
6,790
sveltejs__svelte-6790
['6789']
e82cf3f6d757fc20d0b3be82bac74eeadfc05fea
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ jobs: timeout-minutes: 15 strategy: matrix: - node-version: [8, 10, 12, 14] + node-version: [8, 10, 12, 14, 16] os: [ubuntu-latest, windo...
diff --git a/test/hydration/index.ts b/test/hydration/index.ts --- a/test/hydration/index.ts +++ b/test/hydration/index.ts @@ -52,6 +52,7 @@ describe('hydration', () => { const cwd = path.resolve(`${__dirname}/samples/${dir}`); compileOptions = config.compileOptions || {}; + compileOptions.accessors = 'acce...
{#await} in SSR should suppress rejecting promises ### Describe the bug (This came out of https://github.com/sveltejs/kit/issues/2520 but is a separate matter from how SvelteKit ought to deal with user code that creates unhandled rejected promises.) Node 16 terminates the process immediately when it detects that a ...
null
2021-09-29 22:30: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 ', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'runtime transition-js-each-block-outro (with hydration)', 'runtime transition-js-nested-each-keye...
['ssr component-slot-let-static', 'ssr component-slot-default', 'ssr sigil-expression-function-body', 'ssr bindings-global-dependency', 'vars vars-report-full-script, generate: false', 'validate a11y-no-autofocus', 'ssr destructured-props-3', 'validate css-invalid-global-selector-3', 'ssr dynamic-component-in-if', 'ssr...
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
true
false
false
false
0
0
0
false
false
[]
sveltejs/svelte
6,838
sveltejs__svelte-6838
['6696']
0d7c583364ad87697473af19898f255be0584f21
diff --git a/src/compiler/compile/compiler_errors.ts b/src/compiler/compile/compiler_errors.ts --- a/src/compiler/compile/compiler_errors.ts +++ b/src/compiler/compile/compiler_errors.ts @@ -234,6 +234,10 @@ export default { code: 'invalid-animation', message: 'An element that uses the animate directive must be t...
diff --git a/test/validator/samples/animation-not-in-keyed-each/errors.json b/test/validator/samples/animation-not-in-keyed-each/errors.json --- a/test/validator/samples/animation-not-in-keyed-each/errors.json +++ b/test/validator/samples/animation-not-in-keyed-each/errors.json @@ -1,6 +1,6 @@ [{ "code": "invalid-an...
Improved error message for using animate in an each block with missing key ### Describe the problem Currently, if the `animate` directive is used on an immediate child of an each block, which forgot to add a key, the following error message is shown > An element that uses the animate directive must be the immedia...
null
2021-10-12 14:34:45+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['validate animation-not-in-keyed-each']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Feature
false
true
false
false
1
0
1
true
false
["src/compiler/compile/nodes/Animation.ts->program->class_declaration:Animation->method_definition:constructor"]
sveltejs/svelte
6,920
sveltejs__svelte-6920
['6919']
791e40d0703ad0e5e71f7df61e03c5aeff63a919
diff --git a/src/runtime/internal/scheduler.ts b/src/runtime/internal/scheduler.ts --- a/src/runtime/internal/scheduler.ts +++ b/src/runtime/internal/scheduler.ts @@ -1,5 +1,5 @@ import { run_all } from './utils'; -import { set_current_component } from './lifecycle'; +import { current_component, set_current_component ...
diff --git a/test/runtime/samples/component-binding-onMount/Mount.svelte b/test/runtime/samples/component-binding-onMount/Mount.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-binding-onMount/Mount.svelte @@ -0,0 +1,15 @@ +<script> + import { onMount } from 'svelte'; + + let element; + le...
Svelte bind:this does not give proper working inside onMount body ### Describe the bug After importing Svelte component manually, there are issues retrieving the HTML element with the 'bind:this' binding. After using it inside the onMount function body, the page should be fully loaded and the value 'should' be avail...
The [`bind:this` docs](https://svelte.dev/docs#bind_element) certainly do suggest that it should be available by the time `onMount()` runs, as that's precisely the scenario used in the docs example. Good repro REPL, thanks. It let me confirm that version 3.18.1 is the last version that worked, and that version 3.18.2 d...
2021-11-12 06:00: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 ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['runtime component-binding-onMount (with hydration from ssr rendered html)', 'runtime component-binding-onMount ', 'runtime component-binding-onMount (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/scheduler.ts->program->function_declaration:flush"]
sveltejs/svelte
6,941
sveltejs__svelte-6941
['6914', '6914']
4018b548f3e7728e7bec1b3e13a5f0d59b0342cd
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 @@ -10,6 +10,21 @@ import handle_select_value...
diff --git a/test/js/samples/input-value/expected.js b/test/js/samples/input-value/expected.js --- a/test/js/samples/input-value/expected.js +++ b/test/js/samples/input-value/expected.js @@ -2,12 +2,14 @@ import { SvelteComponent, append, + attr, detach, element, init, insert, listen, noop, + run_all, ...
Cursor jumps to end in search box in Safari ### Describe the bug The cursor in a search box (`input[type="search"]`) with a two-way value binding jumps to the end when typing in Safari. I don't know my way around the Svelte code base, but looking at previous cursor issues, I think `'search`' would have to be added to...
Yup, looking at #4179 where this code was originally added, this sounds like a reasonable suggestion. Are there other text-like input `type`s we should also be handling? Or, would it be better to just exclude all of the `type`s that _aren't_ text-like, which might make this a little more future-proof? Yup, looking at #...
2021-11-19 08:53:24+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['js input-value']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/Element/Attribute.ts->program->class_declaration:AttributeWrapper->method_definition:get_dom_update_conditions"]
sveltejs/svelte
6,963
sveltejs__svelte-6963
['6945']
81fc3f898a49f10856db17014521556a2f18b9dc
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 @@ -24,7 +24,7 @@ import TemplateScope from './nodes/shared/TemplateScope'; import fuzzymatch from '../utils/fuzzymatch'; import get_object from './utils/g...
diff --git a/test/runtime/samples/loop-protect-async-opt-out/_config.js b/test/runtime/samples/loop-protect-async-opt-out/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/loop-protect-async-opt-out/_config.js @@ -0,0 +1,9 @@ +export default { + compileOptions: { + dev: true, + loopGuardTimeout...
`Infinite loop detected` triggered in async loops [REPL example](https://svelte.dev/repl/cd92d7b053f04ce981ad9a3871cdc5cd?version=3.44.2) The code is roughly as follows: ```svelte <script> let pages = [] $: if (search.length > 0) { while (! allPagesLoaded) { pages = [...pages, await loadPage(pr...
Moving this to the `svelte` repo as a feature request to update the loop guard feature ... somehow. Maybe disable it for loops inside async functions?
2021-11-27 15:31:36+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['runtime loop-protect-async-opt-out (with hydration from ssr rendered html)', 'runtime loop-protect-async-opt-out ', 'runtime loop-protect-async-opt-out (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/Component.ts->program->class_declaration:Component->method_definition:post_template_walk", "src/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:post_template_walk->method_definition:enter"]
sveltejs/svelte
6,990
sveltejs__svelte-6990
['4731']
68dd118de0ea93e7da48304e22f7697704fada0d
diff --git a/src/compiler/compile/nodes/Text.ts b/src/compiler/compile/nodes/Text.ts --- a/src/compiler/compile/nodes/Text.ts +++ b/src/compiler/compile/nodes/Text.ts @@ -43,4 +43,21 @@ export default class Text extends Node { return parent_element.namespace || elements_without_text.has(parent_element.name); } +...
diff --git a/test/runtime/samples/pre-tag/_config.js b/test/runtime/samples/pre-tag/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/pre-tag/_config.js @@ -0,0 +1,57 @@ +export default { + test({ assert, target }) { + // Test for <pre> tag + const elementPre = target.querySelector('#pre'); + ...
preserveWhitespace strips prefix space **Describe the bug** The compiler option `preserveWhitespace: true` strips prefix space: ```html <h1> Hello {name}!</h1> ``` **To Reproduce** See [this repo](https://github.com/bwbroersma/preserve-whitespace-in-ssr/). With [minimal changes](https://github.com/bwbroersma/pr...
I'm trying to make near-byte-perfect SSR output because we might be involved in the Creative Commons static site generator of the Licenses (the [deeds](https://creativecommons.org/licenses/by/4.0/deed) and [legalcode](https://creativecommons.org/licenses/by/4.0/legalcode)). Because this is quite a project (with many la...
2021-12-06 03:01:36+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['ssr pre-tag', 'runtime preserve-whitespaces ', 'runtime pre-tag ', 'runtime pre-tag (with hydration)', 'runtime preserve-whitespaces (with hydration from ssr rendered html)', 'ssr preserve-whitespaces', 'runtime pre-tag (with hydration from ssr rendered html)', 'runtime preserve-whitespaces (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
5
1
6
false
false
["src/compiler/compile/nodes/Text.ts->program->class_declaration:Text->method_definition:within_pre", "src/compiler/compile/nodes/Text.ts->program->class_declaration:Text", "src/compiler/compile/render_dom/wrappers/Text.ts->program->class_declaration:TextWrapper->method_definition:use_space", "src/compiler/compile/rend...
sveltejs/svelte
7,007
sveltejs__svelte-7007
['6964']
52549c466badb29371c6fce9580c4b6860988b2f
diff --git a/src/compiler/compile/nodes/AwaitBlock.ts b/src/compiler/compile/nodes/AwaitBlock.ts --- a/src/compiler/compile/nodes/AwaitBlock.ts +++ b/src/compiler/compile/nodes/AwaitBlock.ts @@ -33,12 +33,12 @@ export default class AwaitBlock extends Node { if (this.then_node) { this.then_contexts = []; - un...
diff --git a/test/validator/samples/unreferenced-variables-each/input.svelte b/test/validator/samples/unreferenced-variables-each/input.svelte new file mode 100644 --- /dev/null +++ b/test/validator/samples/unreferenced-variables-each/input.svelte @@ -0,0 +1,20 @@ +<script> + let Component; + export let array; + export...
Component props as default values in #each destructuring ### Describe the problem I expected this to work without issues ([REPL](https://svelte.dev/repl/79c5f5baa2bb4d2781d42b6142365cf4?version=3)) ```svelte <script> export let defaultA = 1 </script> {#each [{a: 2},{b: 3}] as {a = defaultA, b}} {a} {b} ...
null
2021-12-10 09:52:01+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['validate unreferenced-variables-each']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
7
0
7
false
false
["src/compiler/compile/nodes/shared/Context.ts->program->function_declaration:update_reference", "src/compiler/compile/nodes/shared/Context.ts->program->function_declaration:mark_referenced", "src/compiler/compile/nodes/AwaitBlock.ts->program->class_declaration:AwaitBlock->method_definition:constructor", "src/compiler/...
sveltejs/svelte
7,066
sveltejs__svelte-7066
['6121']
966c03a317ceab6b015e5f1fcd946cb5d5ad7678
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Fix non-boolean attribute rendering in SSR to render truthy values as-is ([#6121](https://github.com/sveltejs/svelte/issues/6121)) * Add `a11y-no-redundant-roles` warning ([#7067](https://github.com/sve...
diff --git a/test/runtime/samples/attribute-boolean-true/_config.js b/test/runtime/samples/attribute-boolean-true/_config.js --- a/test/runtime/samples/attribute-boolean-true/_config.js +++ b/test/runtime/samples/attribute-boolean-true/_config.js @@ -1,7 +1,8 @@ export default { - html: '<textarea readonly></textarea>...
Wrong server-side rendering of attributes when value is `true` **Describe the bug** When passing a `true` value to a custom data attribute (e.g. `data-active`) in SSR, it renders `data-active=""`. **To Reproduce** ```svelte <script> let content = true; </script> <div data-active={content}></div> ``` **E...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. I can confirm we are affected by this at @huggingface This issue has been automatically marked as stale because it has not had recent activity. It...
2021-12-28 11:43:19+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b...
['ssr attribute-boolean-true']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/runtime/internal/ssr.ts->program->function_declaration:add_attribute"]
sveltejs/svelte
7,123
sveltejs__svelte-7123
['7122']
4d1d1861ebfcd63eedcd82a3dda7414800e561f4
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 @@ -923,7 +923,7 @@ export default class ElementWrapper exten...
diff --git a/test/runtime/samples/inline-style-directive-string-variable-kebab-case/_config.js b/test/runtime/samples/inline-style-directive-string-variable-kebab-case/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/inline-style-directive-string-variable-kebab-case/_config.js @@ -0,0 +1,18 @@ +...
Kebab case style directives with a template fails ### Describe the bug Currently a kebab case style directive such as `background-image` with a template will cause a error as it uses `-` in it's variable ### Reproduction Ues the following svelte code: ```html <script> let url = "https://raw.githubusercon...
null
2022-01-12 09:56:05+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['runtime inline-style-directive-string-variable-kebab-case (with hydration from ssr rendered html)', 'runtime inline-style-directive-string-variable-kebab-case (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:add_styles"]
sveltejs/svelte
7,232
sveltejs__svelte-7232
['7055']
eb6fb66f192effbae4227e61787bef0b6bdcc213
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 @@ -519,7 +519,7 @@ export default class Component { return result; } - private _extract_exports(node: ExportDefaultDeclaration | ExportNamedDeclarati...
diff --git a/test/validator/samples/unreferenced-variables/input.svelte b/test/validator/samples/unreferenced-variables/input.svelte --- a/test/validator/samples/unreferenced-variables/input.svelte +++ b/test/validator/samples/unreferenced-variables/input.svelte @@ -1,25 +1,48 @@ +<script context="module"> + var a1 = ...
`export enum` in Typescript ends up producing a Svelte compiler warning ### Describe the bug I'm not at all confident that this issue belongs in this repo, since it could plausibly go into several different ones, but I thought I'd file it here to begin with since it's ultimately the Svelte compiler which is generating...
Here's how I'm dealing with this in `rollup.config.js`. Unfortunately, having to list the individual enums makes this an undesirable hack. I didn't see a way to reliably detect the presence of an enum in the frame. ```js plugins: [ svelte({ /* ... */ onwarn: (warning, handler) => { con...
2022-02-07 19:24:55+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['validate unreferenced-variables']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/Component.ts->program->class_declaration:Component->method_definition:_extract_exports"]
sveltejs/svelte
7,280
sveltejs__svelte-7280
['7264']
94f0d7c478137007f89ea562cae4c593d0886f51
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,8 @@ * Fix `{@const}` tag not working inside Component when there's no `let:` [#7189](https://github.com/sveltejs/svelte/issues/7189) * Ignore comments in `{#each}` blocks when containing elements with `animate:` ([#3999](https:...
diff --git a/test/runtime/samples/pre-tag/.editorconfig b/test/runtime/samples/pre-tag/.editorconfig new file mode 100644 --- /dev/null +++ b/test/runtime/samples/pre-tag/.editorconfig @@ -0,0 +1,2 @@ +[main.svelte] +trim_trailing_whitespace = unset diff --git a/test/runtime/samples/pre-tag/_config.js b/test/runtime/sa...
Handle `<pre>`whitespace formatting edge case (no new line) The `<pre>` tag whitespace handling reported in #6437 was largely fixed. There's one detail though that's incorrect: Svelte seems to be adding an [extra whitespace when there's a new line at the beginning](https://svelte.dev/repl/986c1b817bd24ca3803e39f0db7506...
null
2022-02-17 10:43:25+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['ssr pre-tag', 'runtime preserve-whitespaces ', 'runtime textarea-children (with hydration)', 'runtime textarea-children (with hydration from ssr rendered html)', 'runtime pre-tag ', 'runtime pre-tag (with hydration)', 'runtime textarea-content ', 'ssr textarea-content', 'runtime preserve-whitespaces (with hydration f...
null
. /usr/local/nvm/nvm.sh && 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/nodes/Element.ts->program->class_declaration:Element->method_definition:constructor", "src/compiler/compile/render_dom/wrappers/Element/index.ts->program->function_declaration:to_html", "src/compiler/compile/render_dom/wrappers/Element/index.ts->program->function_declaration:to_html_for_attr_valu...
sveltejs/svelte
7,286
sveltejs__svelte-7286
['5950']
54197c5a1f02b01291e6ee062fb51d377bcd99a6
diff --git a/src/compiler/compile/render_dom/wrappers/KeyBlock.ts b/src/compiler/compile/render_dom/wrappers/KeyBlock.ts --- a/src/compiler/compile/render_dom/wrappers/KeyBlock.ts +++ b/src/compiler/compile/render_dom/wrappers/KeyBlock.ts @@ -1,7 +1,6 @@ import Wrapper from './shared/Wrapper'; import Renderer from '....
diff --git a/test/runtime/samples/key-block-transition-local/_config.js b/test/runtime/samples/key-block-transition-local/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/key-block-transition-local/_config.js @@ -0,0 +1,37 @@ +export default { + props: { + x: false, + y: 1 + }, + + test({ asse...
Bug of local transition with keyed clause Is this about svelte@next? This project is currently in a pre-release stage and breaking changes may occur at any time. Please do not post any kind of bug reports or questions on GitHub about it. No **Describe the bug** When using the `{#key }` clause, the local transiti...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Also having this issue: https://svelte.dev/repl/33f123d7c2c24b37b8fc580219de1ead?version=3.38.3 Having this issue as well: https://svelte.dev/repl...
2022-02-18 19:20:17+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['runtime key-block-transition-local (with hydration from ssr rendered html)', 'runtime key-block-transition-local ', 'runtime key-block-transition-local (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/KeyBlock.ts->program->class_declaration:KeyBlockWrapper->method_definition:constructor", "src/compiler/compile/render_dom/wrappers/KeyBlock.ts->program->class_declaration:KeyBlockWrapper->method_definition:render_dynamic_key"]
sveltejs/svelte
7,303
sveltejs__svelte-7303
['7152']
b6441eb6557e368271d353dbbf8b194d5a315f62
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 @@ -145,6 +145,10 @@ class Declaration { ? this.node.value.children[0] : this.node.value; + // Don't minify whitespace in cust...
diff --git a/test/css/samples/css-vars/expected.css b/test/css/samples/css-vars/expected.css --- a/test/css/samples/css-vars/expected.css +++ b/test/css/samples/css-vars/expected.css @@ -1 +1 @@ -:root{--root-test:20}div.svelte-xyz{--test:10} \ No newline at end of file +:root{--root-test:20}div.svelte-xyz{--test:10}di...
whitespace and !important token valid in css custom properties but not in svelte ### Describe the bug ``` h1 { --foo: ; color: var(--foo) blue; } h2 { --foo: !important; color: green var(--foo); } ``` When I read this article [The CSS Custom Property Toggle Trick](https://css-tricks.com/the-css-...
This is just memo but it works well on Firefox. ![image](https://user-images.githubusercontent.com/19153718/149660667-85c3c5a2-4ff8-4904-a761-3a561c07a572.png) @baseballyama, thanks you, you 're right. This bug has gone on - Firefox 96.0.1 ✅ - Safari 15.2 (17612.3.6.1.6) ✅ - Safari Technology Preview Release 1...
2022-02-22 17:05:52+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['css css-vars']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/css/Stylesheet.ts->program->class_declaration:Declaration->method_definition:minify"]
sveltejs/svelte
7,333
sveltejs__svelte-7333
['7327']
9b7b8149e4be41816712aff2b9f34bc0dba23a94
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 @@ -177,7 +177,8 @@ export function create_ssr_component(fn) { export function add_attribute(name, value, boolean) { if (value == null || (boolean && !value)) return ''; - retu...
diff --git a/test/server-side-rendering/samples/attribute-escaped-quotes/_expected.html b/test/server-side-rendering/samples/attribute-escaped-quotes/_expected.html --- a/test/server-side-rendering/samples/attribute-escaped-quotes/_expected.html +++ b/test/server-side-rendering/samples/attribute-escaped-quotes/_expecte...
Hydration Inconsistency: Escaped linebreaks in attributes ### Describe the bug When setting an attribute value to a string (eg: `<input type=hidden name="foo" value={bar} />`), if the string include a line break (eg: `\n` or `\r\n`), the HTML sent to the browser results in the the value being escaped. After hydrat...
This seems to be a bug in Svelte itself; it's rendering attributes inconsistently between the client and the server. It looks like when server-side rendering, Svelte JSON-encodes attributes. If you have a string `str === 'multiple\nlines'` and use it in an attribute `<element attr={str}/>`, it gets turned into `<ele...
2022-03-03 00:53:42+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['ssr attribute-escaped-quotes']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/runtime/internal/ssr.ts->program->function_declaration:add_attribute"]
sveltejs/svelte
7,390
sveltejs__svelte-7390
['7386', '7386']
0eee98a50affd6791f66509b4640770289de42cc
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 @@ -219,6 +219,7 @@ export default class ElementWrapper exten...
diff --git a/test/runtime/samples/inline-style-directive/_config.js b/test/runtime/samples/inline-style-directive/_config.js --- a/test/runtime/samples/inline-style-directive/_config.js +++ b/test/runtime/samples/inline-style-directive/_config.js @@ -1,6 +1,8 @@ export default { html: ` - <p style="color: red;"></p...
style: shorthand missing reactivity in prod mode ### Describe the bug The `style:<prop>` or `style:<prop>={prop}` shorthands can lose reactivity in prod mode in some cases. The particular use-case I'm seeing is a structure like this ```html <div> <div style:color /> </div> ``` where the inner `<div>` has n...
My guess is that we need to enhance the following condition to also bail when a style attribute is used: https://github.com/sveltejs/svelte/blob/0eee98a50affd6791f66509b4640770289de42cc/src/compiler/compile/render_dom/wrappers/Element/index.ts#L225 My guess is that we need to enhance the following condition to also ...
2022-03-24 02:50:59+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['runtime inline-style-directive (with hydration)', 'runtime inline-style-directive ', 'runtime inline-style-directive (with hydration from ssr rendered html)']
null
. /usr/local/nvm/nvm.sh && 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:constructor"]
sveltejs/svelte
7,422
sveltejs__svelte-7422
['7408']
5f020cc91e2c19ae88e92ae9ce3695d980a7e144
diff --git a/src/compiler/compile/render_dom/wrappers/KeyBlock.ts b/src/compiler/compile/render_dom/wrappers/KeyBlock.ts --- a/src/compiler/compile/render_dom/wrappers/KeyBlock.ts +++ b/src/compiler/compile/render_dom/wrappers/KeyBlock.ts @@ -36,6 +36,7 @@ export default class KeyBlockWrapper extends Wrapper { nam...
diff --git a/test/runtime/samples/key-block-component-slot/Component1.svelte b/test/runtime/samples/key-block-component-slot/Component1.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/key-block-component-slot/Component1.svelte @@ -0,0 +1 @@ +<slot/> diff --git a/test/runtime/samples/key-block-compo...
Impossible to pass key blocks through slots ### Describe the bug I'm trying to use a key block to rerender a component based on a condition, but I noticed that if a component is nested it looks like it doesn't actually get re-rendered ### Reproduction https://svelte.dev/repl/990bc381eae748a2822c3d07304d14c2?version=...
@alextana Interestingly, if you pass the `key` into the nested component as a prop, it works as you expect it to: https://svelte.dev/repl/28bfa9addc014a8586ea88a03ed1e80e?version=3.46.5 Yeah, that's interesting and it works well enough for me to close this, thanks a lot @kindoflew :) even if it's possible when it's pas...
2022-04-06 15:31:16+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['runtime key-block-component-slot ', 'runtime key-block-component-slot (with hydration from ssr rendered html)', 'runtime key-block-component-slot (with hydration)']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/render_dom/wrappers/KeyBlock.ts->program->class_declaration:KeyBlockWrapper->method_definition:constructor"]
sveltejs/svelte
7,432
sveltejs__svelte-7432
['7427']
3c11c480b91b6ef5a85b31181d5ae02607dbc1a0
diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -148,7 +148,7 @@ setContext(key: any, context: any) --- -Associates an arbitrary `context` object with the current component and the specified `key`. The...
diff --git a/test/runtime/samples/context-setcontext-return/_config.js b/test/runtime/samples/context-setcontext-return/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/context-setcontext-return/_config.js @@ -0,0 +1,5 @@ +export default { + html: ` + <div>true</div> + ` +}; diff --git a/test/r...
Make setContext return the value that was just set. ### Describe the problem It is a common pattern to put stores into context for reactivity, even the docs recommend it, however there is one mildly annoying thing when you want to use that store within the same component. See the examples below (imports removed for ...
null
2022-04-08 03:01:15+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['runtime context-setcontext-return (with hydration from ssr rendered html)', 'runtime context-setcontext-return (with hydration)', 'ssr context-setcontext-return', 'runtime context-setcontext-return ']
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/runtime/internal/lifecycle.ts->program->function_declaration:setContext"]
sveltejs/svelte
7,434
sveltejs__svelte-7434
['7189']
cd3bb35342492918f48e7aeecedfd9397d173f98
diff --git a/src/compiler/compile/nodes/SlotTemplate.ts b/src/compiler/compile/nodes/SlotTemplate.ts --- a/src/compiler/compile/nodes/SlotTemplate.ts +++ b/src/compiler/compile/nodes/SlotTemplate.ts @@ -27,10 +27,7 @@ export default class SlotTemplate extends Node { this.validate_slot_template_placement(); - co...
diff --git a/test/runtime/samples/const-tag-component-without-let/Component.svelte b/test/runtime/samples/const-tag-component-without-let/Component.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/const-tag-component-without-let/Component.svelte @@ -0,0 +1,2 @@ +<slot name="box1" /> +<slot /> diff -...
@const declaration inside components ignored ### Describe the bug The docs state that > `{@const}` is only allowed as direct child of `{#each}`, `{:then}`, `{:catch}`,**` <Component />`** or` <svelte:fragment />`. but currently if you use it inside a component slot the compiler fails to emit the assignment and t...
Looking at the tests for this aspect of this feature, I suspect it was intended only to work with `let:` variables from the component. If that's so, the docs should be made a bit clearer and the compiler should throw an exception rather than ignoring the `{@const}`.
2022-04-08 17:38:00+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['runtime const-tag-component-without-let ', 'runtime const-tag-component-without-let (with hydration from ssr rendered html)', 'runtime const-tag-component-without-let (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/SlotTemplate.ts->program->class_declaration:SlotTemplate->method_definition:constructor"]
sveltejs/svelte
7,448
sveltejs__svelte-7448
['7440']
39d2dfcbcdbd1bb28748f826635a1617987f7bec
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Fix `{@const}` tag not working inside Component when there's no `let:` [#7189](https://github.com/sveltejs/svelte/issues/7189) * Ignore comments in `{#each}` blocks when containing elements with `animate:` ([#3999](https:...
diff --git a/test/runtime/samples/component-slot-let-in-slot-2/Inner.svelte b/test/runtime/samples/component-slot-let-in-slot-2/Inner.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-slot-let-in-slot-2/Inner.svelte @@ -0,0 +1 @@ +<slot/> diff --git a/test/runtime/samples/component-slot-let...
Slotted content less reactive when referencing external slot props in event handler ### Describe the bug This is a very specific issue which only seems to happen when passing slot props into content slotted into another component, only using them in an event handler. E.g. ```svelte <ItemDisplay content={item}...
You can workaround this by 1. Subscribing to `content` inside the nested slot including reactive event handlers i.e `on:click={(content, () => {})}`. https://svelte.dev/repl/d4666b62f77640d1ad3c1a6a54bc647a?version=3.47.0 2. Spreading `$$props` or `$$restProps` in parent slot (these are not recommended for perf reaso...
2022-04-13 11:34:43+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['runtime component-slot-let-in-slot-2 (with hydration from ssr rendered html)', 'runtime component-slot-let-in-slot-2 (with hydration)', 'runtime component-slot-let-in-slot-2 ']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
1
0
1
true
false
["src/compiler/compile/nodes/shared/Expression.ts->program->class_declaration:Expression->method_definition:constructor->method_definition:enter"]
sveltejs/svelte
7,495
sveltejs__svelte-7495
['7494']
11ada9856512bd7d344be2ce4683cf1a1e30f522
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 @@ -21,7 +21,8 @@ enum NodeExist { } const whitelist_attribute_selector = new Map([ - ['details', new Set(['open'])] + ['details', new Set(['...
diff --git a/test/css/samples/attribute-selector-dialog-open/expected.css b/test/css/samples/attribute-selector-dialog-open/expected.css new file mode 100644 --- /dev/null +++ b/test/css/samples/attribute-selector-dialog-open/expected.css @@ -0,0 +1 @@ +dialog[open].svelte-xyz{display:grid} \ No newline at end of file ...
Unused CSS rule should allow dialog[open] ### Describe the bug Same as #5421 , but for `dialog` element. ```svelte <dialog>Hello</dialog> <style> dialog[open] { display: grid; } </style> ``` Currently, this code is warned as unused CSS. I'm willing to submit a PR later. 👉🏻 #7495 ### Reprod...
null
2022-04-29 12:42:43+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['css attribute-selector-dialog-open']
null
. /usr/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
7,514
sveltejs__svelte-7514
['7504']
0580c2d90d7ef4f1b3bc05a57ca090e2b318cdf1
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 @@ -170,7 +170,7 @@ class Atrule { } apply(node: Element) { - if (this.node.name === 'media' || this.node.name === 'supports') { +...
diff --git a/test/css/samples/at-layer/expected.css b/test/css/samples/at-layer/expected.css new file mode 100644 --- /dev/null +++ b/test/css/samples/at-layer/expected.css @@ -0,0 +1 @@ +@layer base, special;@layer special{div.svelte-xyz{color:rebeccapurple}}@layer base{div.svelte-xyz{color:green}} \ No newline at end...
The contents of `@layer` in `<style>` are removed ### Describe the bug Using [CSS cascade layers](https://developer.mozilla.org/en-US/docs/Web/CSS/@layer) in a Svelte component results in the styles inside the layer being stripped from the final output without warning. ### Reproduction [REPL](https://svelte.dev/repl...
Just checked the REPL, I also find it annoying to have to use :global and similar when I want scoped styles! Hope it gets fixed real quick.
2022-05-05 22:13:18+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['css at-layer']
null
. /usr/local/nvm/nvm.sh && 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:apply"]
sveltejs/svelte
7,650
sveltejs__svelte-7650
['7643']
31e5f8b5de24e2e058cb1a70467c0092e422ee5d
diff --git a/src/compiler/compile/compiler_errors.ts b/src/compiler/compile/compiler_errors.ts --- a/src/compiler/compile/compiler_errors.ts +++ b/src/compiler/compile/compiler_errors.ts @@ -234,6 +234,10 @@ export default { code: 'css-invalid-global-selector', message: ':global(...) must contain a single selecto...
diff --git a/test/validator/samples/css-invalid-combinator-selector-1/errors.json b/test/validator/samples/css-invalid-combinator-selector-1/errors.json new file mode 100644 --- /dev/null +++ b/test/validator/samples/css-invalid-combinator-selector-1/errors.json @@ -0,0 +1,9 @@ +[ + { + "code": "css-invalid-selector",...
Starting a CSS rule with `>` breaks styling without producing an error ### Describe the bug Starting a CSS rule with `>` at the `<style>` root breaks the CSS rules from that point, without producing an error. Consequently, the developer is let wondering why those CSS rules have no effect. I don't see how a child c...
null
2022-07-02 14:53:51+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['validate css-invalid-combinator-selector-1', 'validate css-invalid-combinator-selector-4', 'validate css-invalid-combinator-selector-2', 'validate css-invalid-combinator-selector-3']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
2
0
2
false
false
["src/compiler/compile/css/Selector.ts->program->class_declaration:Selector->method_definition:validate", "src/compiler/compile/css/Selector.ts->program->class_declaration:Selector->method_definition:validate_invalid_combinator_without_selector"]
sveltejs/svelte
7,652
sveltejs__svelte-7652
['7443']
31e5f8b5de24e2e058cb1a70467c0092e422ee5d
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 @@ -299,7 +299,7 @@ function block_might_apply_to_node(block: Block, node: Element): BlockAppliesToN return BlockAppliesToNode.NotPossible; ...
diff --git a/test/css/samples/dynamic-element-tag/_config.js b/test/css/samples/dynamic-element-tag/_config.js new file mode 100644 --- /dev/null +++ b/test/css/samples/dynamic-element-tag/_config.js @@ -0,0 +1,3 @@ +export default { + warnings: [] +}; diff --git a/test/css/samples/dynamic-element-tag/expected.css b/te...
Scoped styles for <svelte:element> ### Describe the problem Currenlty scoped styling for any dynamic tags generated with <svelte:element> give the generic warning "Unused CSS selector", not really sure if that's a bug or it should be added as a feature! ### Describe the proposed solution add support for scoped style...
Could you provide us REPL? I tried to reproduce it on REPL but I couldn't. https://svelte.dev/repl/7e4c14c9a5ce430488e8bdc331a27976?version=3.47.0 The issue is, that can't use the generic tag selectors like this: https://svelte.dev/repl/23d982fc6f4f4f06a6aa227860fa2d84?version=3.47.0 Your workaround with using cl...
2022-07-02 16:21:03+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['css dynamic-element-tag']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Feature
false
true
false
false
1
0
1
true
false
["src/compiler/compile/css/Selector.ts->program->function_declaration:block_might_apply_to_node"]
sveltejs/svelte
7,826
sveltejs__svelte-7826
['5712']
bddd795746c2cdfe04e8256d7a50f4d38ef09238
diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ * Improve a11y `label-has-associated-control` check to recusively check for input control ([#5528](https://github.com/sveltejs/svelte/issues/5528)) * Fix class directive updates after half way transition [#7764](https://g...
diff --git a/test/validator/samples/component-name-lowercase/input.svelte b/test/validator/samples/component-name-lowercase/input.svelte --- a/test/validator/samples/component-name-lowercase/input.svelte +++ b/test/validator/samples/component-name-lowercase/input.svelte @@ -1,7 +1,10 @@ <script> import thisShouldWar...
Non-Svelte imports trigger `x will be treated as an HTML element` warning **Describe the bug** Importing a module with the same name as a HTML element causes Svelte to issue a warning about the element being treated as HTML unless it begins with a capital. **Logs** Example: ```sh <section> will be treated as an ...
This came up before in #5570. I don't know what would be a better option for a reasonable heuristic for this warning. Is the warning even that necessary? If it's getting triggered by simple use-cases like this I think it's more of a hinderance than a help in DX. At least providing a way to opt-out of it would be good. ...
2022-09-02 11:30: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 ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['validate component-name-lowercase']
null
. /usr/local/nvm/nvm.sh && 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/shared/utils/names.ts->program->function_declaration:is_svg", "src/shared/utils/names.ts->program->function_declaration:is_html", "src/compiler/compile/nodes/Element.ts->program->function_declaration:get_namespace", "src/compiler/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:vali...
sveltejs/svelte
7,838
sveltejs__svelte-7838
['7837']
d7cfe22f3702af28334a541f204eafe7f0c0d9db
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 @@ -24,7 +24,7 @@ import { Literal } from 'estree'; import compiler_warnings from '../compiler_warnings'; import compiler_errors from '../c...
diff --git a/test/validator/samples/a11y-no-redundant-roles/warnings.json b/test/validator/samples/a11y-no-redundant-roles/warnings.json --- a/test/validator/samples/a11y-no-redundant-roles/warnings.json +++ b/test/validator/samples/a11y-no-redundant-roles/warnings.json @@ -224,21 +224,6 @@ "line": 15 } }, - {...
A11y warning `role="switch" ... must have "aria-checked"` is a false positive for native `input` elements ### Describe the bug Svelte v3.50.0 added additional accessibility checks in #5852. `role-has-required-aria-props` now emits the following warning: ```html A11y: Elements with the ARIA role "switch" must ha...
null
2022-09-05 15:46:10+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['validate a11y-no-redundant-roles', 'validate a11y-role-has-required-aria-props']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
true
false
false
3
0
3
false
false
["src/compiler/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:validate_attributes_a11y", "src/compiler/compile/utils/a11y.ts->program->function_declaration:is_semantic_role_element", "src/compiler/compile/utils/a11y.ts->program->function_declaration:match_schema"]
sveltejs/svelte
7,858
sveltejs__svelte-7858
['7843']
7331c06a74622a4635968a0c8d87b91fda4a1110
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 @@ -252,41 +252,7 @@ export default class Expression { ); const declaration = b`const $...
diff --git a/test/runtime/samples/const-tag-invalidate/_config.js b/test/runtime/samples/const-tag-invalidate/_config.js new file mode 100644 --- /dev/null +++ b/test/runtime/samples/const-tag-invalidate/_config.js @@ -0,0 +1,34 @@ +export default { + html: ` + <div>[Y] A <button>Toggle</button></div> + <div>[N] B <b...
Invalidating functions cannot be declared as `@const` ### Describe the bug If a function is defined via `@const` that causes invalidation of state, this will throw an error because `$$invalidate` will not be in scope. Possibly a known/intended limitation. ### Reproduction ```svelte <script> let items = [...
null
2022-09-12 09: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 ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['runtime const-tag-invalidate ', 'runtime const-tag-invalidate (with hydration from ssr rendered html)', 'runtime const-tag-invalidate (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/compiler/compile/nodes/shared/Expression.ts->program->class_declaration:Expression->method_definition:manipulate->method_definition:leave", "src/compiler/compile/nodes/shared/Expression.ts->program->class_declaration:Expression->method_definition:manipulate->method_definition:leave->method_definition:enter", "src...
sveltejs/svelte
7,859
sveltejs__svelte-7859
['7808']
ea2f83adebd0a656fae72200525f6e4a1259701f
diff --git a/site/content/docs/03-template-syntax.md b/site/content/docs/03-template-syntax.md --- a/site/content/docs/03-template-syntax.md +++ b/site/content/docs/03-template-syntax.md @@ -1374,6 +1374,22 @@ Desugars to this: --- +For SVG namespace, the example above desugars into using `<g>` instead: + +```sv +...
diff --git a/test/runtime-puppeteer/samples/component-css-custom-properties-dynamic-svg/Svg.svelte b/test/runtime-puppeteer/samples/component-css-custom-properties-dynamic-svg/Svg.svelte new file mode 100644 --- /dev/null +++ b/test/runtime-puppeteer/samples/component-css-custom-properties-dynamic-svg/Svg.svelte @@ -0,...
Style props are incompatible with SVG components ### Describe the bug ## Summary: Passing style props to any component wraps the element in a `<div>`, which breaks the SVG spec for anything rendered inside an `<svg>`. ## Details: If I want to create a Svelte component that renders an SVG element with custom sty...
Interesting enough the RFC discussion doesn't have any "svg" in it https://github.com/sveltejs/rfcs/pull/13 but the [final RFC](https://github.com/sveltejs/rfcs/blob/master/text/0006-style-properties.md) does indeed say this > 🐃 It *would* be possible for someone to accidentally target the `<div>`, so it may be pre...
2022-09-12 10:32: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 ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['ssr component-css-custom-properties-dynamic-svg']
null
. /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit
Bug Fix
false
false
false
true
5
1
6
false
false
["src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts->program->class_declaration:InlineComponentWrapper->method_definition:render", "src/compiler/compile/nodes/InlineComponent.ts->program->function_declaration:get_namespace", "src/compiler/compile/nodes/InlineComponent.ts->program->class_declaration:Inli...
sveltejs/svelte
7,862
sveltejs__svelte-7862
['7552']
7331c06a74622a4635968a0c8d87b91fda4a1110
diff --git a/src/compiler/parse/errors.ts b/src/compiler/parse/errors.ts --- a/src/compiler/parse/errors.ts +++ b/src/compiler/parse/errors.ts @@ -107,6 +107,14 @@ export default { code: `invalid-${slug}-placement`, message: `<${name}> tags cannot be inside elements or blocks` }), + invalid_logic_block_placemen...
diff --git a/test/validator/samples/html-block-in-attribute/errors.json b/test/validator/samples/html-block-in-attribute/errors.json new file mode 100644 --- /dev/null +++ b/test/validator/samples/html-block-in-attribute/errors.json @@ -0,0 +1,9 @@ +[ + { + "code": "invalid-tag-placement", + "message": "{@html} tag c...
{#each} pattern in textarea has inconsistent errors? ### Describe the bug I am unsure if this is a unhelpful error message (bad DX) or a bug on something that should work (i think it's the latter). ```html <textarea> {#each fruits as fruit} {fruit} {/each} </textarea> ``` this gives the following error `...
This is just an error message that could be better. Textareas can't contain multiple DOM nodes or anything, so I really don't know what your code example would do besides something like `<textarea>{fruits.join('\n')}</textarea>` which is much more explicit about how the elements of the array should be joined. I think u...
2022-09-13 05:10:41+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['validate html-block-in-textarea', 'validate logic-block-in-attribute', 'validate html-block-in-attribute', 'validate logic-block-in-textarea']
null
. /usr/local/nvm/nvm.sh && 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/tag.ts->program->function_declaration:read_attribute_value", "src/compiler/parse/state/tag.ts->program->function_declaration:read_sequence", "src/compiler/parse/state/tag.ts->program->function_declaration:tag"]
sveltejs/svelte
7,863
sveltejs__svelte-7863
['7568']
7331c06a74622a4635968a0c8d87b91fda4a1110
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 @@ -212,6 +212,9 @@ if (typeof HTMLElement === 'function') { $on(type, callback) { // TODO should this delegate to addEventListener? + if (!is_fun...
diff --git a/test/runtime/samples/component-events-nullish/Widget.svelte b/test/runtime/samples/component-events-nullish/Widget.svelte new file mode 100644 --- /dev/null +++ b/test/runtime/samples/component-events-nullish/Widget.svelte @@ -0,0 +1,14 @@ +<script> + import { createEventDispatcher } from 'svelte'; + const...
Feature Request: Allow nullish values to omit event handlers ### Describe the problem Most props can be excluded in this sort of fashion: ```svelte <MyComponent prop={condition ? someValue : undefined} /> ``` However, this does not work for event handlers (at least in TS setups) due to the expected TypeScr...
@dummdidumm I think this would be a `language-tools` thing? Is that correct? The compiler itself already allows nullish values for event handlers, and treats them as not attaching a handler. Yes this needs a adjustment in language tools. This is already allowed for Dom events but not component events Thanks, @Conduitr...
2022-09-13 05:40:44+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime inline-style-directive-and-style-attr-merged (with hydration from ssr rendered html)', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydra...
['runtime component-events-nullish (with hydration from ssr rendered html)', 'runtime component-events-nullish ', 'runtime component-events-nullish (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
2
0
2
false
false
["src/runtime/internal/Component.ts->program->method_definition:$on", "src/runtime/internal/Component.ts->program->class_declaration:SvelteComponent->method_definition:$on"]
prettier/prettier
16,765
prettier__prettier-16765
['15476', '16588']
d116d9531c6e676662f158b784341d8417f0e107
diff --git a/changelog_unreleased/html/16765.md b/changelog_unreleased/html/16765.md new file mode 100644 index 000000000000..f4232830b3ab --- /dev/null +++ b/changelog_unreleased/html/16765.md @@ -0,0 +1,18 @@ +#### Keep doctype in non-html files unchanged (#16765 by @fisker) + +In Prettier v3, [we print HTML5 doctype...
diff --git a/tests/format/filename-matters/html-doctype/__snapshots__/format.test.js.snap b/tests/format/filename-matters/html-doctype/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..ab6d595f1c03 --- /dev/null +++ b/tests/format/filename-matters/html-doctype/__snapshots__/format.test.js.snap ...
Prettier breaks XHTML documents by incorrectly lowercasing DOCTYPE The change in https://github.com/prettier/prettier/pull/7391 caused prettier to break my XHTML documents by lowercasing the DOCTYPE, resulting in XML well-formedness errors for my use case. DOCTYPE is case-sensitive in XML contexts. I cannot wrap it ...
We only lowercase doctype when it's HTML5. Can you share an example that we break it? I have plenty of `.xhtml` documents that prettier started doing this to recently. Here's an example XHTML document that was affected (src redacted): ```xhtml <!DOCTYPE html> <script xmlns="http://www.w3.org/1999/xhtml" src="[......
2024-10-18 14:52:41+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
[]
['/testbed/tests/format/filename-matters/html-doctype/format.test.js->format']
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/filename-matters/html-doctype/format.test.js tests/format/filename-matters/html-doctype/__snapshots__/format.test.js.snap tests/format/filename-matters/html-doctype/xhtml-doctype.xhtml --json
Feature
false
true
false
false
3
0
3
false
false
["src/language-html/print/tag.js->program->function_declaration:printOpeningTagStart", "src/language-html/print/tag.js->program->function_declaration:printClosingTagSuffix", "src/language-html/print/tag.js->program->function_declaration:printOpeningTagStartMarker"]
prettier/prettier
16,729
prettier__prettier-16729
['6608']
129b4e8a430862ae831d102ec7234bee2de291f9
diff --git a/changelog_unreleased/typescript/16729.md b/changelog_unreleased/typescript/16729.md new file mode 100644 index 000000000000..515790d69892 --- /dev/null +++ b/changelog_unreleased/typescript/16729.md @@ -0,0 +1,13 @@ +#### Support "Top-level await statements" (#16729 by @fisker) + +<!-- prettier-ignore --> ...
diff --git a/tests/format/js/top-level-await/__snapshots__/format.test.js.snap b/tests/format/js/top-level-await/__snapshots__/format.test.js.snap index 249b632a6672..16fa177226e3 100644 --- a/tests/format/js/top-level-await/__snapshots__/format.test.js.snap +++ b/tests/format/js/top-level-await/__snapshots__/format.te...
No space after await in typescript parser (in some cases) **Prettier 1.18.2** [Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBDA7qgljABAChgCcBXOXAfgB0pc77izclcAzVAGwGc4BKAbhogANCAgAHGFmhdkoVESIR0ABQUJZKVADcIWACYiQAIyKowAazgwAyuPNYoAc2SM4ogBYwAthwDqHjhwXPZgcDYaOFjaOACeyOBcsqKOPEQwKmZO3qjI7NzuIABWXA...
Not a bug. TS does not support top level `await` ([so far](https://github.com/microsoft/TypeScript/issues/25988)), so this works as expected. On the other hand, when formatting a range, not the whole file, it's indeed should be considered a bug. Looks like a new label `area:ranges` needs to be introduced to mark iss...
2024-10-08 06:55:23+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
['/testbed/tests/format/jsx/top-level-await/format.test.js->[babel-ts] format', '/testbed/tests/format/jsx/top-level-await/format.test.js->[meriyah] format', '/testbed/tests/format/jsx/top-level-await/format.test.js->[acorn] format', '/testbed/tests/format/jsx/top-level-await/format.test.js->[__babel_estree] format', '...
['/testbed/tests/format/jsx/top-level-await/format.test.js->[typescript] format', '/testbed/tests/format/typescript/top-level-await/format.test.js->[babel-ts] format', '/testbed/tests/format/typescript/top-level-await/format.test.js->format']
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/typescript/top-level-await/__snapshots__/format.test.js.snap tests/format/js/top-level-await/__snapshots__/format.test.js.snap tests/format/js/top-level-await/test.mjs tests/format/typescript/top-level-await/tes...
Bug Fix
false
true
false
false
3
0
3
false
false
["src/language-js/parse/utils/get-source-type.js->program->function_declaration:getSourceType", "src/language-js/parse/typescript.js->program->function_declaration:parse", "src/language-js/parse/typescript.js->program->function_declaration:getParseOptionsCombinations"]
prettier/prettier
16,691
prettier__prettier-16691
['16710']
9429e539f8f1a1d5fc5b2d0073b3b2f2260cccf9
diff --git a/changelog_unreleased/markdown/16691.md b/changelog_unreleased/markdown/16691.md new file mode 100644 index 000000000000..c9c81a124a82 --- /dev/null +++ b/changelog_unreleased/markdown/16691.md @@ -0,0 +1,153 @@ +#### Don't break a line a between Chinese or Japanese and others (#16691 by @tats-u) + +Markdow...
diff --git a/tests/format/markdown/paragraph/__snapshots__/format.test.js.snap b/tests/format/markdown/paragraph/__snapshots__/format.test.js.snap index 7e789a3c56fa..df219d78e104 100644 --- a/tests/format/markdown/paragraph/__snapshots__/format.test.js.snap +++ b/tests/format/markdown/paragraph/__snapshots__/format.te...
Markdown: Disable breaking a line at the place around Chinese or Japanese characters even when `proseWrap` is `always` <!-- BEFORE SUBMITTING AN ISSUE: 1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues A large number of opened issues are duplicates of existing issues. If s...
null
2024-09-25 15:16:44+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
['/testbed/tests/format/markdown/splitCjkText/format.test.js->format']
['/testbed/tests/format/markdown/splitCjkText/format.test.js->format']
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/markdown/splitCjkText/format.test.js tests/format/markdown/paragraph/__snapshots__/format.test.js.snap tests/format/markdown/splitCjkText/__snapshots__/format.test.js.snap --json
Bug Fix
false
true
false
false
4
0
4
false
false
["src/language-markdown/utils.js->program->function_declaration:splitText", "src/language-markdown/print-whitespace.js->program->function_declaration:printWhitespace", "src/language-markdown/print-whitespace.js->program->function_declaration:isLetter", "src/language-markdown/print-whitespace.js->program->function_decla...
prettier/prettier
16,567
prettier__prettier-16567
['16537']
509a0cc10f12cbfa5304737965f99284449aca88
diff --git a/changelog_unreleased/api/16567.md b/changelog_unreleased/api/16567.md new file mode 100644 index 000000000000..8147d50c0df9 --- /dev/null +++ b/changelog_unreleased/api/16567.md @@ -0,0 +1,34 @@ +#### Make `getPreferredQuote` public (#16567 by @sosukesuzuki) + +This change makes the internal `getPreferredQ...
diff --git a/tests/integration/__tests__/util-shared.js b/tests/integration/__tests__/util-shared.js index 2140db10725e..4fdf3ab37f3b 100644 --- a/tests/integration/__tests__/util-shared.js +++ b/tests/integration/__tests__/util-shared.js @@ -26,6 +26,7 @@ test("shared util has correct structure", () => { "functio...
Any thoughts on making `getPreferredQuote` part of the public `util` API? Since `makeString` is already public and many languages support strings declared with single and double quotes, providing this functionality would benefit many plugins.
I guess it's acceptable. [implementation](https://github.com/prettier/prettier/blob/main/src/utils/get-preferred-quote.js) It sounds good to me
2024-08-12 22:53:37+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
['/testbed/tests/integration/__tests__/util-shared.js->sharedUtil.getIndentSize', '/testbed/tests/integration/__tests__/util-shared.js->sharedUtil.makeString', '/testbed/tests/integration/__tests__/util-shared.js->sharedUtil.getNextNonSpaceNonCommentCharacter and sharedUtil.getNextNonSpaceNonCommentCharacterIndex', '/t...
['/testbed/tests/integration/__tests__/util-shared.js->shared util has correct structure', '/testbed/tests/integration/__tests__/util-shared.js->sharedUtil.getPreferredQuote']
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/integration/__tests__/util-shared.js --json
Feature
false
true
false
false
1
0
1
true
false
["src/utils/get-preferred-quote.js->program->function_declaration:getPreferredQuote"]
prettier/prettier
16,349
prettier__prettier-16349
['16340']
ddce4fb95ccfaaf4435ab5c1e052bf04704c9e3c
diff --git a/changelog_unreleased/javascript/16349.md b/changelog_unreleased/javascript/16349.md new file mode 100644 index 000000000000..5449ced4bc3a --- /dev/null +++ b/changelog_unreleased/javascript/16349.md @@ -0,0 +1,14 @@ +#### Avoid line breaks in import attributes (#16349 by @fisker) + +<!-- prettier-ignore --...
diff --git a/tests/format/js/import-attributes/__snapshots__/format.test.js.snap b/tests/format/js/import-attributes/__snapshots__/format.test.js.snap index db49f25eca14..7bdeced1286c 100644 --- a/tests/format/js/import-attributes/__snapshots__/format.test.js.snap +++ b/tests/format/js/import-attributes/__snapshots__/f...
Unexpected line break in `assert { type: "json" }` **Prettier 3.3.0** [Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEB6VACL2e7-gwo4rADgAYMwALAQwCcBnDQZMIMAdKASwFsAHCPRgZaARkoAzehB4cQAOlS1lK1fIBWjaOxAjGjOEIzAMMAJ584SOZu26AvgG5OvAUdoAmSdNk7FqgMCAjS0oHT0DIxNzS2sdWzCHZ25+QWFaAGZvGTl-IPyC4ITw2n1DYWiLKx...
null
2024-06-04 08:54:03+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
['/testbed/tests/format/js/import-attributes/format.test.js->format', '/testbed/tests/format/js/import-attributes/format.test.js->[acorn] format', '/testbed/tests/format/js/import-attributes/format.test.js->[babel-ts] format', '/testbed/tests/format/js/import-attributes/format.test.js->[espree] format', '/testbed/tests...
['/testbed/tests/format/js/import-attributes/format.test.js->format']
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/js/import-attributes/__snapshots__/format.test.js.snap tests/format/js/import-attributes/long-sources.js tests/format/js/import-attributes/format.test.js --json
Bug Fix
false
true
false
false
1
0
1
true
false
["src/language-js/print/assignment.js->program->function_declaration:chooseLayout"]
prettier/prettier
16,267
prettier__prettier-16267
['16266']
708bb1fe70263549cf7c85508e09b959d623b1de
diff --git a/changelog_unreleased/javascript/16267.md b/changelog_unreleased/javascript/16267.md new file mode 100644 index 000000000000..78471333fbf8 --- /dev/null +++ b/changelog_unreleased/javascript/16267.md @@ -0,0 +1,19 @@ +#### Fix dynamic import when the module source is a template string (#16267 by @fisker) + ...
diff --git a/tests/format/js/dynamic-import/__snapshots__/format.test.js.snap b/tests/format/js/dynamic-import/__snapshots__/format.test.js.snap index 58413f20fa56..4b1fe2a4b4c6 100644 --- a/tests/format/js/dynamic-import/__snapshots__/format.test.js.snap +++ b/tests/format/js/dynamic-import/__snapshots__/format.test.j...
dynamic import keyword is removed when given multiline template string <!-- BEFORE SUBMITTING AN ISSUE: 1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues A large number of opened issues are duplicates of existing issues. If someone has already opened an issue for what you ...
null
2024-05-08 07:37:47+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
['/testbed/tests/format/js/dynamic-import/format.test.js->[typescript] format', '/testbed/tests/format/js/dynamic-import/format.test.js->[babel-ts] format', '/testbed/tests/format/js/dynamic-import/format.test.js->[espree] format', '/testbed/tests/format/js/dynamic-import/format.test.js->[__babel_estree] format', '/tes...
['/testbed/tests/format/js/dynamic-import/format.test.js->[typescript] format', '/testbed/tests/format/js/dynamic-import/format.test.js->[babel-ts] format', '/testbed/tests/format/js/dynamic-import/format.test.js->[espree] format', '/testbed/tests/format/js/dynamic-import/format.test.js->[__babel_estree] format', '/tes...
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/js/dynamic-import/__snapshots__/format.test.js.snap tests/format/js/dynamic-import/import-phase.js tests/format/js/dynamic-import/format.test.js tests/format/js/dynamic-import/template-literal.js --json
Bug Fix
false
true
false
false
1
0
1
true
false
["src/language-js/print/call-expression.js->program->function_declaration:printCallExpression"]
prettier/prettier
16,058
prettier__prettier-16058
['16057']
99bc9d0b6d3a9bcc0de6e99786502fba2d29b4fe
diff --git a/changelog_unreleased/javascript/16058.md b/changelog_unreleased/javascript/16058.md new file mode 100644 index 000000000000..f870d51b783d --- /dev/null +++ b/changelog_unreleased/javascript/16058.md @@ -0,0 +1,16 @@ +#### Fix unstable object print (#16058 by @fisker) + +<!-- prettier-ignore --> +```jsx +//...
diff --git a/tests/format/js/quote-props/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/quote-props/__snapshots__/jsfmt.spec.js.snap index 607faf8b47ce..2c612aa6d1c5 100644 --- a/tests/format/js/quote-props/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/quote-props/__snapshots__/jsfmt.spec.js.snap @@ -293,3...
Unstable property key print **Prettier 3.2.5** [Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBDABAXncAOlddXEAMwgmKXQEYAafQ4gI111QCdL0AmeqAXxC0QEAA4wAltADOyUB3YQA7gAUOCWSlQAbJagCes4U3aowAazgwAyqgC2cADISocZCR3S4x0xavXRMxcAc2QYdgBXbxAvOwkwyOi4AA9ROHYJB1gdABV0qA4JOE0PbS9haRDtOABFCIh4d09ogCtpZOsq2vrGp...
null
2024-02-07 08:55:53+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
['/testbed/tests/format/js/quote-props/jsfmt.spec.js->[__babel_estree] format', '/testbed/tests/format/js/quote-props/jsfmt.spec.js->[meriyah] format', '/testbed/tests/format/js/quote-props/jsfmt.spec.js->[acorn] format', '/testbed/tests/format/js/quote-props/jsfmt.spec.js->format', '/testbed/tests/format/js/quote-prop...
['/testbed/tests/format/js/quote-props/jsfmt.spec.js->format']
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/js/quote-props/__snapshots__/jsfmt.spec.js.snap tests/format/js/quote-props/jsfmt.spec.js tests/format/js/quote-props/objects.js --json
Bug Fix
false
true
false
false
1
0
1
true
false
["src/language-js/print/property.js->program->function_declaration:isStringKeySafeToUnquote"]
prettier/prettier
15,947
prettier__prettier-15947
['15945']
6c6a332171f590a38c369673662d1a5baf765167
diff --git a/changelog_unreleased/json/15947.md b/changelog_unreleased/json/15947.md new file mode 100644 index 000000000000..59d9c68cbbbf --- /dev/null +++ b/changelog_unreleased/json/15947.md @@ -0,0 +1,14 @@ +#### Fix incorrect parser inference (#15947 by @fisker) + +Files like `.eslintrc.json` were incorrectly form...
diff --git a/tests/integration/__tests__/__snapshots__/support-info.js.snap b/tests/integration/__tests__/__snapshots__/support-info.js.snap index b1803945bed9..61c17b5ddc18 100644 --- a/tests/integration/__tests__/__snapshots__/support-info.js.snap +++ b/tests/integration/__tests__/__snapshots__/support-info.js.snap @...
Prettier 3.2.3 incorrectly formats `.estlintrc.json` I'll check how it's loaded.
Confirmed, we should not treat it as jsonc. https://github.com/eslint/eslintrc/blob/a61384731aff386a8260a80d9710c912e4f62aaa/lib/config-array-factory.js#L188-L203 Before we work on it, let's double check and make sure [these files](https://github.com/prettier/prettier/blob/6c6a332171f590a38c369673662d1a5baf765167/tes...
2024-01-17 09:29:19+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
['/testbed/tests/integration/__tests__/with-parser-inference.js->(write)', '/testbed/tests/integration/__tests__/with-parser-inference.js->(status)', '/testbed/tests/integration/__tests__/with-parser-inference.js->json from .prettierrc', '/testbed/tests/integration/__tests__/with-parser-inference.js->json from .styleli...
['/testbed/tests/integration/__tests__/with-parser-inference.js->json from .swcrc']
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/integration/__tests__/with-parser-inference.js tests/integration/__tests__/__snapshots__/support-info.js.snap --json
Bug Fix
true
false
false
false
0
0
0
false
false
[]
prettier/prettier
15,926
prettier__prettier-15926
['15897']
c2e20fbae8ce1800ac0c8242c176d9379db5c001
diff --git a/changelog_unreleased/angular/15926.md b/changelog_unreleased/angular/15926.md new file mode 100644 index 000000000000..15a7d1bba687 --- /dev/null +++ b/changelog_unreleased/angular/15926.md @@ -0,0 +1,42 @@ +#### Respect `trailingComma` in Angular templates (#15926 by @fisker) + +If you are using an old ve...
diff --git a/tests/format/angular/angular/__snapshots__/format.test.js.snap b/tests/format/angular/angular/__snapshots__/format.test.js.snap index f6aa3e031ded..f257aeded0f9 100644 --- a/tests/format/angular/angular/__snapshots__/format.test.js.snap +++ b/tests/format/angular/angular/__snapshots__/format.test.js.snap @...
Object literals in Angular templates are missing trailing commas **Prettier 3.1.1** [Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAJgSwG4B0oAEBAVFAOYCSAZgLy4jD5FEDOADgIZiblIHtceZACQEAPgQ4sAnlDAAaJswCuLOACc+qjaIlTZCpQF9JLAmBgAPekoDa5AMIAbKSwC6dBkqIByNpYBaJzIfPgtLADoBbnICGhoCH2CfRUJmP0CAW3RQ8ysoz...
It's indented to not support `trailingComma`, https://github.com/prettier/prettier/blob/b4ed91bffb0a9140259f4190b77cce1b77284ca0/src/language-html/embed/angular-attributes.js#L23 But maybe it's supportted now? Ah, supported since May, 2023. https://github.com/angular/angular/pull/49535 It seems still not supported ...
2024-01-15 12:29:28+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
['/testbed/tests/format/angular/trailing-comma/format.test.js->format']
['/testbed/tests/format/angular/trailing-comma/format.test.js->format']
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/angular/angular/__snapshots__/format.test.js.snap tests/format/angular/trailing-comma/__snapshots__/format.test.js.snap tests/format/angular/trailing-comma/trailing-comma.html tests/format/angular/trailing-comma...
Bug Fix
false
true
false
false
5
0
5
false
false
["src/language-html/embed/angular-control-flow-block-parameters.js->program->function_declaration:printAngularControlFlowBlockParameters", "src/language-html/embed.js->program->function_declaration:embed", "src/language-html/embed/angular-attributes.js->program->function_declaration:createAngularPrinter", "src/language...
prettier/prettier
15,831
prettier__prettier-15831
['15553']
66a23c9331e2c652f8e08fd05a65d2bea7fe5c1a
diff --git a/changelog_unreleased/json/15831.md b/changelog_unreleased/json/15831.md new file mode 100644 index 000000000000..a52ecdbab09e --- /dev/null +++ b/changelog_unreleased/json/15831.md @@ -0,0 +1,9 @@ +#### [Highlight] New `jsonc` parser added (#15831 by @fisker) + +Previously, we infer the parser of `.jsonc` ...
diff --git a/tests/config/utils/check-parsers.js b/tests/config/utils/check-parsers.js index 8fa94e73e4b5..bf8665a44455 100644 --- a/tests/config/utils/check-parsers.js +++ b/tests/config/utils/check-parsers.js @@ -72,9 +72,9 @@ const categoryParsers = new Map([ [ "json", { - parsers: ["json", "json5"...
Prettier should format JSONC with trailing commas - Right now, Prettier's default value of "trailingCommas" is "all", which is fantastic. Presumably, most people who use Prettier would agree with this, as the reasons for wanting trailing commas are compelling: better Git diffs, easier refactoring, and so on. - For all...
Maybe we should add a jsonc parser? Yes, that's what I'm proposing in the final section of the OP. 🙏 I also have needs for this, @sosukesuzuki what do you think? I think adding `jsonc` parser makes sense. This is because JSON and JSONC have different syntax. PR welcome.
2023-12-19 02:50:04+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
['/testbed/tests/integration/__tests__/with-parser-inference.js->(write)', '/testbed/tests/integration/__tests__/with-parser-inference.js->(status)', '/testbed/tests/integration/__tests__/with-parser-inference.js->json from .prettierrc', '/testbed/tests/integration/__tests__/with-parser-inference.js->json from .styleli...
['/testbed/tests/format/json/jsonc/trialing-comma/jsfmt.spec.js->format', '/testbed/tests/format/json/jsonc/single-quote/jsfmt.spec.js->format', '/testbed/tests/unit/builtin-plugins.js->builtin parsers', '/testbed/tests/format/json/with-comment/jsfmt.spec.js->format', '/testbed/tests/format/json/range/jsonc/jsfmt.spec....
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/json/jsonc/quote-props/jsfmt.spec.js tests/format/json/jsonc/trialing-comma/__snapshots__/jsfmt.spec.js.snap tests/integration/__tests__/__snapshots__/plugin-options-string.js.snap tests/format/json/range/jsonc/...
Feature
true
false
false
false
0
0
0
false
false
["src/main/comments/attach.js->program->function_declaration:attachComments", "src/language-js/print/assignment.js->program->function_declaration:chooseLayout", "src/language-js/utils/index.js->program->function_declaration:isStringPropSafeToUnquote", "src/main/range-util.js->program->function_declaration:isSourceEleme...
prettier/prettier
15,467
prettier__prettier-15467
['15396', '15396']
c140ed6b5354bc64d15f33eb9fbaa2571a375aa1
diff --git a/changelog_unreleased/cli/15467.md b/changelog_unreleased/cli/15467.md new file mode 100644 index 000000000000..b69c49842e3f --- /dev/null +++ b/changelog_unreleased/cli/15467.md @@ -0,0 +1,19 @@ +#### Show `(unchanged)` keyword for accessibility in CLI `--write` (#15467 by @ADTC) + +Previously, the only di...
diff --git a/tests/integration/__tests__/__snapshots__/line-after-filepath-with-errors.js.snap b/tests/integration/__tests__/__snapshots__/line-after-filepath-with-errors.js.snap index f571b2fe4f19..54cd7779dd82 100644 --- a/tests/integration/__tests__/__snapshots__/line-after-filepath-with-errors.js.snap +++ b/tests/i...
`--write` to show text identifier for unchanged files ('grey color only' an accessibility concern 🧑‍🦯) The output of `--write` can't distinguish between changed and unchanged text if color is not visible. ### Suggestion: Distinguish using text. Consider that the use of color to distinguish changed vs unchanged ...
I agree with giving `(unchanged)` to output for accessibility. I agree with giving `(unchanged)` to output for accessibility.
2023-09-27 16:24:28+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
["/testbed/tests/integration/__tests__/cache.js->doesn't create default cache file when `--cache-location` exists", '/testbed/tests/integration/__tests__/cache.js->creates default cache file named `node_modules/.cache/prettier/.prettier-cache`', '/testbed/tests/integration/__tests__/cache.js->throws error when use with...
['/testbed/tests/integration/__tests__/cache.js->re-formats when options has been updated.', "/testbed/tests/integration/__tests__/cache.js->doesn't format when cache is available", "/testbed/tests/integration/__tests__/cache.js->doesn't re-format when timestamp has been updated", '/testbed/tests/integration/__tests__/...
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/integration/__tests__/__snapshots__/write.js.snap tests/integration/__tests__/__snapshots__/line-after-filepath-with-errors.js.snap tests/integration/__tests__/cache.js --json
Feature
false
true
false
false
1
0
1
true
false
["src/cli/format.js->program->function_declaration:formatFiles"]
prettier/prettier
15,408
prettier__prettier-15408
['15315']
675490ae55fe1c0b797db13bf5f055711d2c0b69
diff --git a/changelog_unreleased/typescript/15408.md b/changelog_unreleased/typescript/15408.md new file mode 100644 index 000000000000..abade71c2386 --- /dev/null +++ b/changelog_unreleased/typescript/15408.md @@ -0,0 +1,21 @@ +#### Support embedded formatting in template literals annotated with `as const` (#15408 by...
diff --git a/tests/format/flow/as-const/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/as-const/__snapshots__/jsfmt.spec.js.snap new file mode 100644 index 000000000000..39860b333915 --- /dev/null +++ b/tests/format/flow/as-const/__snapshots__/jsfmt.spec.js.snap @@ -0,0 +1,46 @@ +// Jest Snapshot v1, https://goo....
/* GraphQL */ comment tag does not format with typescript `as const` **Prettier 3.0.0** [Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEAlA8gIVwBUBlAfQEUBVAUWwE0yB1ASSIAkyBhXAORKKYAvJgD0AKkwBxAE4BDAA4ALCgBlM40ZgAGAHSiZMARwCucGQE9MJTMExolEBZgC++7ZjlpMkKBgDc+vq+GDgExOTUdPTCYpKyiirqmjr6hqbmVjZ2D...
I don't think we need to support this. @hanayashiki Hi, can you tell me why this is needed? Is there any meaning in adding `as const` to template literal in TypeScript? > @hanayashiki Hi, can you tell me why this is needed? Is there any meaning in adding `as const` to template literal in TypeScript? If you don't use...
2023-09-16 08:56:24+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
['/testbed/tests/format/flow/as-const/jsfmt.spec.js->[babel-flow] format']
['/testbed/tests/format/flow/as-const/jsfmt.spec.js->format']
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/flow/as-const/embedded.js tests/format/typescript/as/as-const-embedded.ts tests/format/typescript/as/__snapshots__/jsfmt.spec.js.snap tests/format/flow/as-const/jsfmt.spec.js tests/format/flow/as-const/__snapsho...
Bug Fix
false
true
false
false
5
0
5
false
false
["src/language-js/embed/utils.js->program->function_declaration:hasLeadingBlockCommentWithName", "src/language-js/embed/utils.js->program->function_declaration:isAsConstExpression", "src/language-js/embed/html.js->program->function_declaration:isHtml", "src/language-js/embed/utils.js->program->function_declaration:hasL...
prettier/prettier
15,326
prettier__prettier-15326
['15325']
a35008fb0a010f92c1002ee074c6a7f3c0d8da41
diff --git a/changelog_unreleased/javascript/15326.md b/changelog_unreleased/javascript/15326.md new file mode 100644 index 000000000000..1758d939d842 --- /dev/null +++ b/changelog_unreleased/javascript/15326.md @@ -0,0 +1,69 @@ +#### Fix comment between parentheses and function body (#15326 by @fisker) + +<!-- prettie...
diff --git a/tests/format/js/comments/function/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/comments/function/__snapshots__/jsfmt.spec.js.snap new file mode 100644 index 000000000000..c5de94d7b508 --- /dev/null +++ b/tests/format/js/comments/function/__snapshots__/jsfmt.spec.js.snap @@ -0,0 +1,78 @@ +// Jest Snap...
Error when formatting anonymous export default function **Prettier 3.0.2** [Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEcAeAHCAnGACAEzgDMBDAVwBt9jyowYBLaACgEoAdKAem7xgAWjAM54ReUnlr0m0LsC5482ODHLYoeACwAmLgF8QAGhAQMsqMOShS2bBADuABVsIrKUpQekAnlZMARtikYADWqgDKpAC2cAAyjFBwyGSUwnCBwWGRGCGJAObIMNjkGSDp...
null
2023-08-29 09:35:00+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
[]
['/testbed/tests/format/js/comments/function/jsfmt.spec.js->[acorn] format', '/testbed/tests/format/js/comments/function/jsfmt.spec.js->[meriyah] format', '/testbed/tests/format/js/comments/function/jsfmt.spec.js->[babel-ts] format', '/testbed/tests/format/js/comments/function/jsfmt.spec.js->[flow] format', '/testbed/t...
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/js/comments/function/between-parentheses-and-function-body.js tests/format/js/comments/function/__snapshots__/jsfmt.spec.js.snap tests/format/js/comments/function/jsfmt.spec.js --json
Bug Fix
false
true
false
false
1
0
1
true
false
["src/language-js/comments/handle-comments.js->program->function_declaration:handleLastFunctionArgComments"]
prettier/prettier
15,233
prettier__prettier-15233
['15195']
06a8e377a3ee2a5de5866d1c8bec27bdffd6aa08
diff --git a/changelog_unreleased/api/15233.md b/changelog_unreleased/api/15233.md new file mode 100644 index 000000000000..cd64b782f0d9 --- /dev/null +++ b/changelog_unreleased/api/15233.md @@ -0,0 +1,9 @@ +#### Support shared config that forbids `require()` (#15233 by @fisker) + +If an external shared config package ...
diff --git a/tests/integration/__tests__/config-resolution.js b/tests/integration/__tests__/config-resolution.js index 2885bad8b9fa..4e0cb05d05eb 100644 --- a/tests/integration/__tests__/config-resolution.js +++ b/tests/integration/__tests__/config-resolution.js @@ -361,3 +361,15 @@ test(".json5 config file(invalid)", ...
Prettier 3.x - Package subpath is not defined Hi, after updating prettier to `3.0.0`, I am trying to set the main configuration from the shared configuration (npm package) but I'm getting errors via terminal: ``` ["INFO" - 3:55:52 PM] Formatting file... ["ERROR" - 3:55:52 PM] Error resolving prettier configuration...
:wave: @ivodolenc, we use the issue tracker exclusively for development purposes. For questions, please use [Stack Overflow](https://stackoverflow.com/questions/ask?tags=prettier). Hi @kachkaev, may I ask why you closed this? Do I need you to share an example repo? 👋 @ivodolenc! I marked this issue as a question and i...
2023-08-11 09:40:41+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
['/testbed/tests/integration/__tests__/config-resolution.js->API resolveConfig with nested file arg and .editorconfig and indent_size = tab', '/testbed/tests/integration/__tests__/config-resolution.js->.json5 config file', '/testbed/tests/integration/__tests__/config-resolution.js->API resolveConfig with nested file ar...
['/testbed/tests/integration/__tests__/config-resolution.js->support external module with `module` only `exports`']
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/integration/cli/config/external-config/esm-package-forbids-require/index.js tests/integration/__tests__/config-resolution.js tests/integration/cli/config/external-config/esm-package-forbids-require/package.json tests/i...
Bug Fix
false
true
false
false
1
0
1
true
false
["src/config/load-external-config.js->program->function_declaration:loadExternalConfig"]
prettier/prettier
14,830
prettier__prettier-14830
['14786']
20ab6d6f1c5bd774621230b493a3b71d39383a2c
diff --git a/changelog_unreleased/typescript/14830.md b/changelog_unreleased/typescript/14830.md new file mode 100644 index 000000000000..f8f3b7235624 --- /dev/null +++ b/changelog_unreleased/typescript/14830.md @@ -0,0 +1,22 @@ +#### Fix issue with double semicolon caused by `// prettier-ignore` on a call signature li...
diff --git a/tests/format/typescript/call-signature/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/call-signature/__snapshots__/jsfmt.spec.js.snap new file mode 100644 index 000000000000..4dacb6c0f423 --- /dev/null +++ b/tests/format/typescript/call-signature/__snapshots__/jsfmt.spec.js.snap @@ -0,0 +1,131 ...
Bug report: using `// prettier-ignore` on a call signature line leads to broken code on format **Prettier 2.8.8** [Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEMCeAHOACAYhCbAXm2AB0ptsAKASiWwDcIBLAEwG5sB6b7DAE5wYMFnAEBaFgHMoEIRSoBnOJChsGSmAJZRpHCgF8DUEABoQEDKOhLkoAIYCBEAO4AFJwjsoHAG1cHNDsLACMBBzAA...
Hello, I don't have prior experience contributing to this project, but I would like to work on this issue as a good first issue. If I find a solution, I plan to submit a pull request.
2023-05-17 03:57:50+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
['/testbed/tests/format/typescript/call-signature/jsfmt.spec.js->[babel-ts] format']
['/testbed/tests/format/typescript/call-signature/jsfmt.spec.js->format']
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/typescript/call-signature/__snapshots__/jsfmt.spec.js.snap tests/format/typescript/call-signature/call-signature.ts tests/format/typescript/call-signature/jsfmt.spec.js --json
Bug Fix
false
true
false
false
1
0
1
true
false
["src/language-js/print/object.js->program->function_declaration:printObject"]
prettier/prettier
14,788
prettier__prettier-14788
['14148']
dfe32bcc388388ed27dce93096e2f920086e3d00
diff --git a/changelog_unreleased/cli/14788.md b/changelog_unreleased/cli/14788.md new file mode 100644 index 000000000000..d9c4a25910d9 --- /dev/null +++ b/changelog_unreleased/cli/14788.md @@ -0,0 +1,20 @@ +#### Print line breaking after file path with errors (#14788 by @sosukesuzuki) + +Previously, only the `--write...
diff --git a/tests/integration/__tests__/__snapshots__/line-after-filepath-with-errors.js.snap b/tests/integration/__tests__/__snapshots__/line-after-filepath-with-errors.js.snap new file mode 100644 index 000000000000..1571cd02c9e9 --- /dev/null +++ b/tests/integration/__tests__/__snapshots__/line-after-filepath-with-...
--list-different logs errors after file path instead of in a new line **Environments:** - Prettier Version: 2.8.2 - Running Prettier via: CLI - Operating System: all **Steps to reproduce:** create a index.js file with a syntax issue in it, then run: ```bash npx prettier --list-different "./**/*.{js,jsx,ts,...
@fisker, @thorn0, @sosukesuzuki sorry for disturbing you, would you please have a look at this issue?
2023-05-03 08:50:13+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
['/testbed/tests/integration/__tests__/line-after-filepath-with-errors.js->(stderr)', '/testbed/tests/integration/__tests__/line-after-filepath-with-errors.js->(write)', '/testbed/tests/integration/__tests__/line-after-filepath-with-errors.js->(stdout)', '/testbed/tests/integration/__tests__/line-after-filepath-with-er...
['/testbed/tests/integration/__tests__/line-after-filepath-with-errors.js->(stdout)']
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/integration/cli/syntax-errors/invalid-1.js tests/integration/cli/syntax-errors/invalid-2.unknown tests/integration/cli/syntax-errors/invalid-2.js tests/integration/cli/syntax-errors/valid-1.js tests/integration/__tests...
Bug Fix
false
true
false
false
1
0
1
true
false
["src/cli/format.js->program->function_declaration:handleError"]
prettier/prettier
14,688
prettier__prettier-14688
['14518']
fb948bb15f31ade3b35e66b720f8d44260de45f8
diff --git a/changelog_unreleased/typescript/14688.md b/changelog_unreleased/typescript/14688.md new file mode 100644 index 000000000000..7dd93092ef84 --- /dev/null +++ b/changelog_unreleased/typescript/14688.md @@ -0,0 +1,15 @@ +#### Fix missing required comma in type parameters (#14688 by @fisker, @sosukesuzuki) + +P...
diff --git a/tests/format/misc/errors/typescript/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/typescript/__snapshots__/jsfmt.spec.js.snap index 09287ad25493..87806c395393 100644 --- a/tests/format/misc/errors/typescript/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/typescript/__snapshot...
Required Comma on Unconstrained Generic Removed in .mts Files <!-- BEFORE SUBMITTING AN ISSUE: 1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues A large number of opened issues are duplicates of existing issues. If someone has already opened an issue for what you are exper...
Hmmm, interesting. Do you know how to reproduce this issue in https://www.typescriptlang.org/play? This could well be a bug, I’m just trying to see the error somewhere. AFAIR, Prettier retains `<T,>` in `tsx` files to avoid confusion with `<JsxTags>`. We might need to apply the same rule to `mts` extension and maybe ev...
2023-04-11 07:41:00+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
['/testbed/tests/integration/__tests__/format.js->typescript parser should throw the first error when both JSX and non-JSX mode failed', '/testbed/tests/integration/__tests__/format.js->markdown parser should handle CRLF correctly', '/testbed/tests/format/typescript/tsx/comma/jsfmt.spec.js->format', '/testbed/tests/int...
['/testbed/tests/format/typescript/tsx/comma/jsfmt.spec.js->format']
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/typescript/tsx/comma/__snapshots__/jsfmt.spec.js.snap tests/format/typescript/typeparams/print-width-120/issue-7542.tsx tests/format/typescript/last-argument-expansion/__snapshots__/jsfmt.spec.js.snap tests/form...
Bug Fix
false
true
false
false
5
0
5
false
false
["src/language-js/print/type-parameters.js->program->function_declaration:printTypeParameters", "src/language-js/parse/typescript.js->program->function_declaration:getParseOptionsCombinations", "src/language-js/parse/typescript.js->program->function_declaration:parse", "src/language-js/utils/index.js->program->function...
prettier/prettier
14,548
prettier__prettier-14548
['14547']
ddf3b43c33e2e98f6413b5232ad623876d96738e
diff --git a/changelog_unreleased/typescript/14548.md b/changelog_unreleased/typescript/14548.md new file mode 100644 index 000000000000..82262a8462ea --- /dev/null +++ b/changelog_unreleased/typescript/14548.md @@ -0,0 +1,24 @@ +#### Allow decorators on private members and class expressions (#14548 by @fisker) + +<!--...
diff --git a/tests/format/js/decorators/class-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/decorators/class-expression/__snapshots__/jsfmt.spec.js.snap index 123d72efa2a2..38356821e791 100644 --- a/tests/format/js/decorators/class-expression/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/decora...
Decorators on accessor private fields report SyntaxError **Prettier 2.8.5** [Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAucAbAhgZ0wAgII7AA6UOOAAgCZxgAUAlDumGHNhAE44DEAZgJZxUlANwkAviAA0ICAAcY-aJmSh0HDhADuABXUIVKdKi3oAnipkAjDswDWcGAGV0AWzgAZflDjJexzDhrWzAHZzlmbwBzZBgOAFcgkDhXKzhKakoPdCgo+PQouAAxTld0...
TypeScript seems don't allow it [playground](https://www.typescriptlang.org/play?#code/MYGwhgzhAECC0G8BQ1oAEAmBTYAKAlNGMMFlAPYBO0AxAGYCWWIGA3EgL5A) You should unset the `experimentalDecorators` option. While it's enabled, it uses stage 2 decorator proposal, not the latest stage 3 proposal
2023-03-21 07:41:07+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
['/testbed/tests/format/typescript/type-arguments-bit-shift-left-like/jsfmt.spec.js->6.ts format', '/testbed/tests/format/js/decorators/class-expression/jsfmt.spec.js->super-class.js - {"semi":false} [acorn] format', '/testbed/tests/format/js/decorators/class-expression/jsfmt.spec.js->super-class.js format', '/testbed/...
['/testbed/tests/format/js/decorators/class-expression/jsfmt.spec.js->super-class.js [typescript] format', '/testbed/tests/format/js/decorators/class-expression/jsfmt.spec.js->member-expression.js - {"semi":false} [typescript] format', '/testbed/tests/format/typescript/type-arguments-bit-shift-left-like/jsfmt.spec.js->...
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/typescript/type-arguments-bit-shift-left-like/jsfmt.spec.js tests/format/typescript/type-arguments-bit-shift-left-like/__snapshots__/jsfmt.spec.js.snap tests/format/js/decorators/class-expression/__snapshots__/j...
Bug Fix
false
true
false
false
2
0
2
false
false
["src/language-js/parse/postprocess/typescript.js->program->function_declaration:throwErrorForInvalidDecorator", "src/language-js/parse/postprocess/typescript.js->program->function_declaration:nodeCanBeDecorated"]
prettier/prettier
14,400
prettier__prettier-14400
['13197']
6905b39ec7bc6ed38732e26ceced5b57677e2600
diff --git a/changelog_unreleased/html/14400.md b/changelog_unreleased/html/14400.md new file mode 100644 index 000000000000..7d9accfd49ed --- /dev/null +++ b/changelog_unreleased/html/14400.md @@ -0,0 +1,38 @@ +#### Format `<script>` inside SVG (#14400 by @fisker) + +<!-- prettier-ignore --> +```html +<!-- Input --> +...
diff --git a/tests/config/utils/check-parsers.js b/tests/config/utils/check-parsers.js index 166b37619f6f..a8def844d115 100644 --- a/tests/config/utils/check-parsers.js +++ b/tests/config/utils/check-parsers.js @@ -46,7 +46,10 @@ const categoryParsers = new Map([ "handlebars", { parsers: ["glimmer"], verifyPa...
Script in SVG is incorrectly formatted when using HTML parser <!-- BEFORE SUBMITTING AN ISSUE: 1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues A large number of opened issues are duplicates of existing issues. If someone has already opened an issue for what you are exper...
null
2023-02-22 12:55:33+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
[]
['/testbed/tests/format/html/svg/embeded/jsfmt.spec.js->format']
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/html/svg/svg.html tests/config/utils/check-parsers.js tests/format/html/svg/embeded/__snapshots__/jsfmt.spec.js.snap tests/format/html/svg/embeded/svg.svg tests/format/html/svg/embeded/jsfmt.spec.js tests/format...
Bug Fix
false
true
false
false
1
0
1
true
false
["src/language-html/utils/index.js->program->function_declaration:isScriptLikeTag"]
prettier/prettier
14,317
prettier__prettier-14317
['14035']
b96dc57cd34210576cac66080b0a32aac2a9d8e3
diff --git a/changelog_unreleased/api/14317.md b/changelog_unreleased/api/14317.md new file mode 100644 index 000000000000..9367d8448742 --- /dev/null +++ b/changelog_unreleased/api/14317.md @@ -0,0 +1,25 @@ +#### Update `prettier.util` (#14317 by @fisker) + +- Added `prettier.util.getNextNonSpaceNonCommentCharacter` +...
diff --git a/tests/integration/__tests__/util-shared.js b/tests/integration/__tests__/util-shared.js index af0d90e69f50..a88f8209b8b4 100644 --- a/tests/integration/__tests__/util-shared.js +++ b/tests/integration/__tests__/util-shared.js @@ -21,6 +21,7 @@ test("shared util has correct structure", () => { expect(typ...
Utility functions requests Is there any reason why `getNextNonSpaceNonCommentCharacterIndex` is in the public API but `getNextNonSpaceNonCommentCharacter` isn't? it's a one liner we could do without in [prettier-plugin-solidity](https://github.com/prettier-solidity/prettier-plugin-solidity). Also, `hasNodeIgnoreComm...
null
2023-02-09 07:10:21+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
['/testbed/tests/integration/__tests__/util-shared.js->sharedUtil.getIndentSize', '/testbed/tests/integration/__tests__/util-shared.js->sharedUtil.makeString', '/testbed/tests/integration/__tests__/util-shared.js->sharedUtil.getMaxContinuousCount', '/testbed/tests/integration/__tests__/util-shared.js->sharedUtil.getAli...
['/testbed/tests/integration/__tests__/util-shared.js->shared util has correct structure', '/testbed/tests/integration/__tests__/util-shared.js->sharedUtil.getNextNonSpaceNonCommentCharacter and sharedUtil.getNextNonSpaceNonCommentCharacterIndex']
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/integration/__tests__/util-shared.js --json
Feature
false
true
false
false
3
0
3
false
false
["src/common/util.js->program->function_declaration:getNextNonSpaceNonCommentCharacter", "src/common/util-shared.js->program->function_declaration:getNextNonSpaceNonCommentCharacterIndex", "src/common/util-shared.js->program->function_declaration:legacyGetNextNonSpaceNonCommentCharacterIndex"]
prettier/prettier
14,170
prettier__prettier-14170
['14168']
c1b976572c7512dfa7d7407706891f511883c0ad
diff --git a/changelog_unreleased/angular/14170.md b/changelog_unreleased/angular/14170.md new file mode 100644 index 000000000000..471169c7dbfe --- /dev/null +++ b/changelog_unreleased/angular/14170.md @@ -0,0 +1,18 @@ +#### Allow self-closing tags on custom elements (#14170 by @fisker) + +See [Angular v15.1.0 release...
diff --git a/tests/format/angular/self-closing/__snapshots__/jsfmt.spec.js.snap b/tests/format/angular/self-closing/__snapshots__/jsfmt.spec.js.snap new file mode 100644 index 000000000000..f4a624bed741 --- /dev/null +++ b/tests/format/angular/self-closing/__snapshots__/jsfmt.spec.js.snap @@ -0,0 +1,36 @@ +// Jest Snap...
Angular templates self closing tags <!-- BEFORE SUBMITTING AN ISSUE: 1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues A large number of opened issues are duplicates of existing issues. If someone has already opened an issue for what you are experiencing, you do not n...
null
2023-01-13 02:01:08+00:00
JavaScript
FROM polybench_javascript_base WORKDIR /testbed COPY . . RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
[]
['/testbed/tests/format/angular/self-closing/jsfmt.spec.js->self-closing.component.html format']
[]
. /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/angular/self-closing/jsfmt.spec.js tests/format/angular/self-closing/self-closing.component.html tests/format/angular/self-closing/__snapshots__/jsfmt.spec.js.snap --json
Feature
false
true
false
false
2
0
2
false
false
["src/language-html/parser-html.js->program->function_declaration:ngHtmlParser", "src/language-html/parser-html.js->program->function_declaration:createParser"]