Simon H
a2565efa37
docs: tweak "invalid assignment" compiler error message ( #14955 )
...
* docs: tweak "invalid assignment" compiler error message
fixes #14702
* tweak wording
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 days ago
Rich Harris
d41801c75f
feat: warn on using `slide` transition with invalid `display` styles ( #14936 )
...
* feat: warn on using `slide` transition with table elements
* more generic
* more generic
3 days ago
Caique Torres
48e3db21c1
fix: default values in object destructuring ( #14554 )
...
* fix: enhance string/expression length check and fix closing character issues
* docs: add documentation for unterminated_string_constant error
* test: add tests for object destructuring with default values in "each" blocks
* Update .changeset/clean-planets-rush.md
* refactor: clean up unnecessary comments and whitespace
* fix: resolve formatting issues
* simplify
* tweak
* regenerate
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
4 days ago
Rich Harris
97f3aa9151
docs: fix links in some errors/warnings ( #14825 )
...
* fix links in some errors/warnings
* fix
3 weeks ago
Rich Harris
bfa0b34663
add self-closing-tags info ( #14758 )
...
* add self-closing-tags info
* regenerate
3 weeks ago
Dominic Gannaway
5483495c8d
feat: add $inspect.trace rune ( #14290 )
...
* feat: add $trace rune
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
* lint
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* more tweaks
* lint
* improve label for derived cached
* improve label for derived cached
* lint
* better stacks
* complete redesign
* fixes
* dead code
* dead code
* improve change detection
* rename rune
* lint
* lint
* fix bug
* tweaks
* Update packages/svelte/src/internal/client/dev/tracing.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/dev/tracing.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/dev/tracing.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/dev/tracing.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* todos
* add test + some docs
* changeset
* update messages
* address feedback
* address feedback
* limit to first statement of function
* remove unreachable trace_rune_duplicate error
* tweak message
* remove the expression statement, not the expression
* revert
* make label optional
* relax restriction on label - no longer necessary with new design
* update errors
* newline
* tweak
* add some docs
* fix playground
* fix playground
* tweak message when function runs outside an effect
* unused
* tweak
* handle async functions
* fail on generators
* regenerate, update docs
* better labelling
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
4 weeks ago
waedi
65db409860
docs: typo in ## script_context_deprecated ( #14694 )
...
* Fix typo in ## script_context_deprecated
Changed +++context+++ to +++module+++
* regenerate
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
4 weeks ago
Simon H
68d266e0f8
fix: remove overzealous `reactive_declaration_non_reactive_property` warning ( #14663 )
...
fixes #14532
This removes the `reactive_declaration_non_reactive_property` warning altogether. The first version caused many false positives at compile time. The refined runtime version (introduced in #14192 ) was hoped to fix this, but it turns out we now get loads of false positives at runtime.
1 month ago
Rich Harris
d43a10ba7a
feat: add `svelte/reactivity/window` module ( #14660 )
...
* feat: add `svelte/reactivity/window` module
* lint
* fix
* hide private types
* online binding
* tweak docs
* tweak
* add @since tags
---------
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
1 month ago
Rich Harris
3dcd5a4a3e
fix docs ( #14635 )
1 month ago
Simon H
c6fca02009
docs: more details for errors/warnings on the site ( #14632 )
...
* docs: more details for errors/warnings on the site
Related to #11305
* Apply suggestions from code review
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* fix in correct place
* tab not spaces
* tweaks
* fix
* Apply suggestions from code review
* regenerate
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
Dominic Gannaway
5771b455c0
feat: add support for bind getter/setters ( #14307 )
...
* feat: add support for bind getters/setters
* different direction
* oops
* oops
* build
* add changeset and tests
* move validation
* add comment
* build
* bind:group error
* simpler to just keep it as a SequenceExpression
* fix
* lint
* fix
* move validation to visitor
* fix
* no longer needed
* fix
* parser changes are no longer needed
* simplify
* simplify
* update messages
* docs
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
1 month ago
Simon H
86ae349bcc
fix: better error messages for invalid HTML trees ( #14445 )
...
* fix: better error messages for invalid HTML trees
closes #13331
* fix test
* more concise
* tweak
* tweak messages
* adjust tests
* tweak message slightly, so it doesn't sound like the bad element is the one we're currently encountering
* put locations in generated message
* tidy up
* consistency
* fix
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
Rich Harris
4c4f18b24c
chore: fix docs ( #14538 )
1 month ago
Rich Harris
fe0bd299a5
fix: proxify values when assigning using `||=`, `&&=` and `??=` operators ( #14273 )
...
* add failing test for #14268
* simplify
* proxify values when using ||=, &&= and ??= assignment operators
* proxify values assigned to private state fields
* changeset
* fix
* fix
* add warning
* update test
1 month ago
Rich Harris
a5de086f95
feat: turn `reactive_declaration_non_reactive_property` into a runtime warning ( #14192 )
...
* turn `reactive_declaration_non_reactive_property` into a runtime warning
* ignore warning
* Update packages/svelte/src/internal/client/reactivity/effects.js
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* Update packages/svelte/src/internal/client/runtime.js
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* fix
* test
* changeset
* Update .changeset/witty-turtles-bake.md
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* add some details
* check
* regenerate
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
1 month ago
Dominic Gannaway
4d2f2fb8e6
feat: allow snippets to be exported from module scripts ( #14315 )
...
* feat: allow snippets to be exported from module scripts
* tweak type
* fix issue + add test
* refactor
* refactor
* fix exports error
* fix lint
* fix lint
* error on undefined export
* hoisted snippets belong in transform state, not analysis
* put the code where it's used
* drop the local_. just binding. it's cleaner
* simplify
* simplify
* simplify
* simplify
* tidy up
* oops
* update message, add some details
* lint
* Apply suggestions from code review
* add some docs
* Update packages/svelte/src/compiler/phases/3-transform/utils.js
* Update .changeset/famous-parents-turn.md
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
1 month ago
Dominic Gannaway
ed7ebcde1e
feat: add error boundaries ( #14211 )
...
* feat: add error boundary support
tweak
tweak again
retry -> reset
tweaks
add tests
tweaks
tweaks
tweaks
more tests
more tests and tweaks
comments
tweak
tweak
tweak
tweak
tweak
* tweak
tweak
tweak
tweak
more fixes
tweak
tweak
more fixes
changeset
* Update packages/svelte/elements.d.ts
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* Update .changeset/polite-peaches-do.md
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* fix issue with rethrowing
* handle fallback error
* handle fallback error
* add more test coverage
* more tests
* more bug fixes
* guard against non-errors
* add component_stack to error
* alternative approach
* remove spread support
* lint
* add to legacy ast
* add to svelte-html
* disallow anything but attributes on the boundary element
* fix error
* more validation
* only create block when necessary
* swap argument order - results in nicer-looking code in many cases
* Update .changeset/polite-peaches-do.md
* simplify a bit
* simplify
* move declaration closer to usage
* push once
* unused
* tweaks
* consistent naming
* simplify
* add a couple newlines
* tweak comments
* simplify
* newlines
* placeholder documentation
* add some docs
* Update packages/svelte/src/internal/client/dom/blocks/boundary.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/dom/blocks/boundary.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/dom/blocks/boundary.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* fix type
* fix link
* explain what happens if onerror throws
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
Dominic Gannaway
7fd3774015
fix: disallow invalid attributes for `<svelte:window>` and `<svelte:document>` ( #14228 )
2 months ago
Conduitry
2ab70041fd
chore: mark markdown output from process-messages as generated ( #13913 )
...
* chore: mark markdown output from process-messages as generated
* regenerate
2 months ago
Rich Harris
ffbd5c971e
docs: fix runtime-warnings page ( #14077 )
...
* fix runtime-warnings page
* fix
2 months ago
Rich Harris
4157db94c4
fix: correct typo in compiler error messages ( #14044 )
2 months ago
Richard Smith
e99e865291
docs: update links to point to new site ( #13986 )
...
Update (some) of the links pointing to the old preview site as mentioned in #13982 .
This updates all the links in documentation/ and packages/svelte/messages, but doesn't touch others present in packages/svelte/ or fix the original link in that issue.
3 months ago
Paolo Ricciuti
8ff2af52d3
fix: show filename information in `legacy_recursive_reactive_block` ( #13764 )
3 months ago
Rich Harris
fd78385447
chore: restructure docs for new site ( #13699 )
3 months ago
Dominic Gannaway
ae10f4d37c
breaking: state mutations inside the template are no longer allowed ( #13660 )
...
* breaking: state mutations inside the template are no longer allowed
* fix test
* fix test
* lint
* update error message
* fix test
3 months ago
Dominic Gannaway
139114bdcb
fix: ensure legacy run utility does not cause cycles ( #13643 )
...
* fix: ensure legacy run utility does not cause cycles
* add warning
* add warning
* lint
* feedback
* lint
* lint
3 months ago
Dominic Gannaway
2070c8a166
breaking: disallow state mutations in logic block expression ( #13625 )
3 months ago
Rich Harris
5ee3ae4369
update diffs ( #13575 )
...
* update diffs
* gah
* fix
3 months ago
Simon H
4578d4f25a
docs: generate pages for compiler/runtime warnings/errors ( #13557 )
...
* docs: generate pages for compiler/runtime warnings/errors
Ideally each warning has accompanying details so that it doesn't look so empty on the final site, but that can happen separately
* fix
* sort alphabetically, code ticks for headings
* only uppercase first word
* regenerate
* generate codes using [!NOTE], remove any backticks and escape `<` characters
* some prose preceeding the list of compiler warnings
* bring over prose from Svelte 4 a11y warnings
* fix
* lint
* remove backticks from headers, now that they are getting rendered
* Revert "remove backticks from headers, now that they are getting rendered"
This reverts commit c295281848
.
* back to normal headers/code blocks
* fix
* separate authored from generated stuff
* newlines
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 months ago
Rich Harris
233bbecf55
chore: rename placeholder file ( #13520 )
3 months ago
Simon Holthausen
dfb8eee1cc
docs: some module intro comments
3 months ago
Simon Holthausen
25f67df911
docs: adjust placeholder syntax
...
switch over to using the existing `> ...` syntax, using the new `> MODULE: ..` placeholder. Related to https://github.com/sveltejs/svelte.dev/pull/78
4 months ago
Ben McCann
145d67a489
docs: copy Svelte 5 docs from omnisite ( #12317 )
6 months ago