Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] prevent crashing when tag attributes are empty (#2492)
Fixes #2491
- Loading branch information
1 parent
2b54b65
commit 791e2a4
Showing
6 changed files
with
41 additions
and
0 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 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
Fix script and style tags without attributes crashing svelte-kit package |
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
4 changes: 4 additions & 0 deletions
4
packages/kit/src/packaging/test/fixtures/typescript/expected/Plain.svelte
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,4 @@ | ||
<script> | ||
/** @type {import('./foo').Foo} */ | ||
export let foo; | ||
</script> |
26 changes: 26 additions & 0 deletions
26
packages/kit/src/packaging/test/fixtures/typescript/expected/Plain.svelte.d.ts
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,26 @@ | ||
/** @typedef {typeof __propDef.props} PlainProps */ | ||
/** @typedef {typeof __propDef.events} PlainEvents */ | ||
/** @typedef {typeof __propDef.slots} PlainSlots */ | ||
export default class Plain extends SvelteComponentTyped< | ||
{ | ||
foo: boolean; | ||
}, | ||
{ | ||
[evt: string]: CustomEvent<any>; | ||
}, | ||
{} | ||
> {} | ||
export type PlainProps = typeof __propDef.props; | ||
export type PlainEvents = typeof __propDef.events; | ||
export type PlainSlots = typeof __propDef.slots; | ||
import { SvelteComponentTyped } from 'svelte'; | ||
declare const __propDef: { | ||
props: { | ||
foo: import('./foo').Foo; | ||
}; | ||
events: { | ||
[evt: string]: CustomEvent<any>; | ||
}; | ||
slots: {}; | ||
}; | ||
export {}; |
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
4 changes: 4 additions & 0 deletions
4
packages/kit/src/packaging/test/fixtures/typescript/src/lib/Plain.svelte
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,4 @@ | ||
<script> | ||
/** @type {import('./foo').Foo} */ | ||
export let foo; | ||
</script> |