-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update svelte to 5.0.0-next.181 and fix for
{:else if}
(#548)
- Loading branch information
Showing
19 changed files
with
179 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"svelte-eslint-parser": minor | ||
--- | ||
|
||
fix: update svelte to 5.0.0-next.181 and fix for `{:else if}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
// FIXME Since the node type is not provided by "svelte/compiler", | ||
// we work around this by extracting the type from the parse function. | ||
// See also https://github.com/sveltejs/svelte/issues/12292 | ||
|
||
import type { parse } from "svelte/compiler"; | ||
|
||
export type Root = ModernParseReturnType<typeof parse>; | ||
export type Fragment = Root["fragment"]; | ||
export type SvelteOptions = Root["options"]; | ||
export type Script = Root["instance"]; | ||
type FragmentChild = Fragment["nodes"][number]; | ||
|
||
export type Text = Extract<FragmentChild, { type: "Text" }>; | ||
|
||
export type ExpressionTag = Extract<FragmentChild, { type: "ExpressionTag" }>; | ||
export type HtmlTag = Extract<FragmentChild, { type: "HtmlTag" }>; | ||
export type ConstTag = Extract<FragmentChild, { type: "ConstTag" }>; | ||
export type DebugTag = Extract<FragmentChild, { type: "DebugTag" }>; | ||
export type RenderTag = Extract<FragmentChild, { type: "RenderTag" }>; | ||
|
||
export type Component = Extract<FragmentChild, { type: "Component" }>; | ||
export type TitleElement = Extract<FragmentChild, { type: "TitleElement" }>; | ||
export type SlotElement = Extract<FragmentChild, { type: "SlotElement" }>; | ||
export type RegularElement = Extract<FragmentChild, { type: "RegularElement" }>; | ||
export type SvelteBody = Extract<FragmentChild, { type: "SvelteBody" }>; | ||
export type SvelteComponent = Extract< | ||
FragmentChild, | ||
{ type: "SvelteComponent" } | ||
>; | ||
export type SvelteDocument = Extract<FragmentChild, { type: "SvelteDocument" }>; | ||
export type SvelteElement = Extract<FragmentChild, { type: "SvelteElement" }>; | ||
export type SvelteFragment = Extract<FragmentChild, { type: "SvelteFragment" }>; | ||
export type SvelteHead = Extract<FragmentChild, { type: "SvelteHead" }>; | ||
export type SvelteOptionsRaw = Extract< | ||
FragmentChild, | ||
{ type: "SvelteOptions" } | ||
>; | ||
export type SvelteSelf = Extract<FragmentChild, { type: "SvelteSelf" }>; | ||
export type SvelteWindow = Extract<FragmentChild, { type: "SvelteWindow" }>; | ||
|
||
export type IfBlock = Extract<FragmentChild, { type: "IfBlock" }>; | ||
export type EachBlock = Extract<FragmentChild, { type: "EachBlock" }>; | ||
export type AwaitBlock = Extract<FragmentChild, { type: "AwaitBlock" }>; | ||
export type KeyBlock = Extract<FragmentChild, { type: "KeyBlock" }>; | ||
export type SnippetBlock = Extract<FragmentChild, { type: "SnippetBlock" }>; | ||
|
||
export type Comment = Extract<FragmentChild, { type: "Comment" }>; | ||
type ComponentAttribute = Component["attributes"][number]; | ||
export type Attribute = Extract<ComponentAttribute, { type: "Attribute" }>; | ||
export type SpreadAttribute = Extract< | ||
ComponentAttribute, | ||
{ type: "SpreadAttribute" } | ||
>; | ||
export type AnimateDirective = Extract< | ||
ComponentAttribute, | ||
{ type: "AnimateDirective" } | ||
>; | ||
export type BindDirective = Extract< | ||
ComponentAttribute, | ||
{ type: "BindDirective" } | ||
>; | ||
export type ClassDirective = Extract< | ||
ComponentAttribute, | ||
{ type: "ClassDirective" } | ||
>; | ||
export type LetDirective = Extract< | ||
ComponentAttribute, | ||
{ type: "LetDirective" } | ||
>; | ||
export type OnDirective = Extract<ComponentAttribute, { type: "OnDirective" }>; | ||
export type StyleDirective = Extract< | ||
ComponentAttribute, | ||
{ type: "StyleDirective" } | ||
>; | ||
export type TransitionDirective = Extract< | ||
ComponentAttribute, | ||
{ type: "TransitionDirective" } | ||
>; | ||
export type UseDirective = Extract< | ||
ComponentAttribute, | ||
{ type: "UseDirective" } | ||
>; | ||
|
||
export type Tag = ExpressionTag | HtmlTag | ConstTag | DebugTag | RenderTag; | ||
export type ElementLike = | ||
| Component | ||
| TitleElement | ||
| SlotElement | ||
| RegularElement | ||
| SvelteBody | ||
| SvelteComponent | ||
| SvelteDocument | ||
| SvelteElement | ||
| SvelteFragment | ||
| SvelteHead | ||
| SvelteOptionsRaw | ||
| SvelteSelf | ||
| SvelteWindow; | ||
export type Block = EachBlock | IfBlock | AwaitBlock | KeyBlock | SnippetBlock; | ||
|
||
export type Directive = | ||
| AnimateDirective | ||
| BindDirective | ||
| ClassDirective | ||
| LetDirective | ||
| OnDirective | ||
| StyleDirective | ||
| TransitionDirective | ||
| UseDirective; | ||
|
||
type ModernParseReturnType<T> = T extends { | ||
(source: string, options: { filename?: string; modern: true }): infer R; | ||
(...args: any[]): any; | ||
} | ||
? R | ||
: any; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.