Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: tidy up messages #11327

Merged
merged 38 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
0e5632f
start reorganising messages
Rich-Harris Apr 24, 2024
ea42b08
tidy up
Rich-Harris Apr 24, 2024
a642609
more
Rich-Harris Apr 24, 2024
1fe66eb
more
Rich-Harris Apr 24, 2024
6489a1c
more
Rich-Harris Apr 24, 2024
00ba986
alphabetise
Rich-Harris Apr 24, 2024
1bcc281
consolidate
Rich-Harris Apr 24, 2024
2ae5f85
more
Rich-Harris Apr 24, 2024
ceeaa2e
more
Rich-Harris Apr 24, 2024
f74aa4f
more
Rich-Harris Apr 24, 2024
ff3b95e
more
Rich-Harris Apr 24, 2024
3de52cb
more
Rich-Harris Apr 24, 2024
8255ad6
more
Rich-Harris Apr 24, 2024
35108ca
alphabetise
Rich-Harris Apr 24, 2024
d728e42
more
Rich-Harris Apr 24, 2024
c1153e9
this is no longer needed
Rich-Harris Apr 24, 2024
40d29df
no longer necessary
Rich-Harris Apr 24, 2024
0d8effa
more
Rich-Harris Apr 24, 2024
3c45764
more
Rich-Harris Apr 24, 2024
a6b3585
fix
Rich-Harris Apr 24, 2024
712f543
regenerate messages
Rich-Harris Apr 24, 2024
def67ec
more
Rich-Harris Apr 24, 2024
2458a80
more
Rich-Harris Apr 24, 2024
3f93f4f
tighten up rune validation
Rich-Harris Apr 25, 2024
785c675
more
Rich-Harris Apr 25, 2024
125fb80
fix
Rich-Harris Apr 25, 2024
f854645
more
Rich-Harris Apr 25, 2024
73fbde1
tweak a11y messages
Rich-Harris Apr 25, 2024
cecf9a7
add server errors
Rich-Harris Apr 25, 2024
c6acba8
overhaul runtime errors
Rich-Harris Apr 25, 2024
157aad3
regenerate messages
Rich-Harris Apr 25, 2024
f80d450
unused
Rich-Harris Apr 25, 2024
6780e4a
lint
Rich-Harris Apr 25, 2024
a20b693
more
Rich-Harris Apr 25, 2024
a983fbd
more
Rich-Harris Apr 25, 2024
28f0acf
Update packages/svelte/messages/compile-errors/script.md
Rich-Harris Apr 25, 2024
82ab2cd
Update packages/svelte/messages/client-warnings/warnings.md
Rich-Harris Apr 25, 2024
e281ab5
fix
Rich-Harris Apr 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ packages/svelte/src/compiler/errors.js
packages/svelte/src/compiler/warnings.js
packages/svelte/src/internal/client/errors.js
packages/svelte/src/internal/client/warnings.js
packages/svelte/src/internal/shared/errors.js
packages/svelte/src/internal/shared/warnings.js
packages/svelte/src/internal/server/errors.js
packages/svelte/tests/**/*.svelte
packages/svelte/tests/**/_expected*
packages/svelte/tests/**/_actual*
Expand Down
3 changes: 0 additions & 3 deletions packages/svelte/messages/client-errors/effects.md

This file was deleted.

67 changes: 67 additions & 0 deletions packages/svelte/messages/client-errors/errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
## bind_invalid_checkbox_value

> Using `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead

## bind_invalid_export

> Component %component% has an export named `%key%` that a consumer component is trying to access using `bind:%key%`, which is disallowed. Instead, use `bind:this` (e.g. `<%name% bind:this={component} />`) and then access the property on the bound component instance (e.g. `component.%key%`)

## bind_not_bindable

> A component is attempting to bind to a non-bindable property `%key%` belonging to %component% (i.e. `<%name% bind:%key%={...}>`). To mark a property as bindable: `let { %key% = $bindable() } = $props()`

## each_key_duplicate

> Keyed each block has duplicate key at indexes %a% and %b%

> Keyed each block has duplicate key `%value%` at indexes %a% and %b%

## effect_in_teardown

> `%rune%` cannot be used inside an effect cleanup function

## effect_orphan

> `%rune%` can only be used inside an effect (e.g. during component initialisation)

## effect_update_depth_exceeded

> Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops

## hydration_missing_marker_close

> Missing hydration closing marker

## hydration_missing_marker_open

> Missing hydration opening marker

## lifecycle_legacy_only

> `%name%(...)` cannot be used in runes mode

## props_invalid_value

> Cannot do `bind:%key%={undefined}` when `%key%` has a fallback value

## props_rest_readonly

> Rest element properties of `$props()` such as `%property%` are readonly

## rune_outside_svelte

> The `%rune%` rune is only available inside `.svelte` and `.svelte.js/ts` files

## state_prototype_fixed

> Cannot set prototype of `$state` object

## state_unsafe_mutation

> Unsafe mutations during Svelte's render or derived phase are not permitted in runes mode. This can lead to unexpected errors and possibly cause infinite loops.
>
> If the object is not meant to be reactive, declare it without `$state`

## svelte_component_invalid_this_value

> The `this={...}` property of a `<svelte:component>` must be a Svelte component, if defined
7 changes: 0 additions & 7 deletions packages/svelte/messages/client-errors/lifecycle.md

This file was deleted.

8 changes: 8 additions & 0 deletions packages/svelte/messages/client-warnings/warnings.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## hydration_attribute_changed

> The `%attribute%` attribute on `%html%` changed its value between server and client renders. The client value, `%value%`, will be ignored in favour of the server value

## hydration_mismatch

> Hydration failed because the initial UI does not match what was rendered on the server

## lifecycle_double_unmount

> Tried to unmount a component that was not mounted
Expand Down
59 changes: 0 additions & 59 deletions packages/svelte/messages/compile-errors/attributes.md

This file was deleted.

33 changes: 0 additions & 33 deletions packages/svelte/messages/compile-errors/bindings.md

This file was deleted.

7 changes: 0 additions & 7 deletions packages/svelte/messages/compile-errors/compiler_options.md

This file was deleted.

3 changes: 0 additions & 3 deletions packages/svelte/messages/compile-errors/components.md

This file was deleted.

3 changes: 0 additions & 3 deletions packages/svelte/messages/compile-errors/const_tag.md

This file was deleted.

27 changes: 0 additions & 27 deletions packages/svelte/messages/compile-errors/elements.md

This file was deleted.

3 changes: 0 additions & 3 deletions packages/svelte/messages/compile-errors/legacy_reactivity.md

This file was deleted.

11 changes: 11 additions & 0 deletions packages/svelte/messages/compile-errors/options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## options_invalid_value

> Invalid compiler option: %details%

## options_removed

> Invalid compiler option: %details%

## options_unrecognised

> Unrecognised compiler option %keypath%