Skip to content

Commit

Permalink
include packaging test changes from #5120
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed May 30, 2022
1 parent d13bf34 commit 7f81340
Show file tree
Hide file tree
Showing 20 changed files with 85 additions and 85 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script>
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring;
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring = 'potato';
const dispatch = createEventDispatcher();
dispatch('event', true);
const dispatch = createEventDispatcher();
dispatch('event', true);
</script>

<slot {astring} />
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script>
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring;
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring = 'potato';
const dispatch = createEventDispatcher();
dispatch('event', true);
const dispatch = createEventDispatcher();
dispatch('event', true);
</script>

<slot {astring} />
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script>
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring;
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring = 'potato';
const dispatch = createEventDispatcher();
dispatch('event', true);
const dispatch = createEventDispatcher();
dispatch('event', true);
</script>

<slot {astring} />
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/** @typedef {typeof __propDef.slots} TestSlots */
export default class Test extends SvelteComponentTyped<
{
astring: string;
astring?: string;
},
{
event: CustomEvent<any>;
Expand All @@ -24,7 +24,7 @@ export type TestSlots = typeof __propDef.slots;
import { SvelteComponentTyped } from 'svelte';
declare const __propDef: {
props: {
astring: string;
astring?: string;
};
events: {
event: CustomEvent<any>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script>
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring;
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring = 'potato';
const dispatch = createEventDispatcher();
dispatch('event', true);
const dispatch = createEventDispatcher();
dispatch('event', true);
</script>

<slot {astring} />
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script>
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring;
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring = 'potato';
const dispatch = createEventDispatcher();
dispatch('event', true);
const dispatch = createEventDispatcher();
dispatch('event', true);
</script>

<slot {astring} />
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/** @typedef {typeof __propDef.slots} TestSlots */
export default class Test extends SvelteComponentTyped<
{
astring: string;
astring?: string;
},
{
event: CustomEvent<any>;
Expand All @@ -24,7 +24,7 @@ export type TestSlots = typeof __propDef.slots;
import { SvelteComponentTyped } from 'svelte';
declare const __propDef: {
props: {
astring: string;
astring?: string;
};
events: {
event: CustomEvent<any>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script>
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring;
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring = 'potato';
const dispatch = createEventDispatcher();
dispatch('event', true);
const dispatch = createEventDispatcher();
dispatch('event', true);
</script>

<slot {astring} />
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script>
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring;
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring = 'potato';
const dispatch = createEventDispatcher();
dispatch('event', true);
const dispatch = createEventDispatcher();
dispatch('event', true);
</script>

<slot {astring} />
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/** @typedef {typeof __propDef.slots} TestSlots */
export default class Test extends SvelteComponentTyped<
{
astring: string;
astring?: string;
},
{
event: CustomEvent<any>;
Expand All @@ -24,7 +24,7 @@ export type TestSlots = typeof __propDef.slots;
import { SvelteComponentTyped } from 'svelte';
declare const __propDef: {
props: {
astring: string;
astring?: string;
};
events: {
event: CustomEvent<any>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @type {string}
*/
export const astring;
export const astring = 'potato';
const dispatch = createEventDispatcher();
dispatch('event', true);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script>
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring;
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring = 'potato';
const dispatch = createEventDispatcher();
dispatch('event', true);
const dispatch = createEventDispatcher();
dispatch('event', true);
</script>

<slot {astring} />
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/** @typedef {typeof __propDef.slots} TestSlots */
export default class Test extends SvelteComponentTyped<
{
astring: string;
astring?: string;
},
{
event: CustomEvent<any>;
Expand All @@ -24,7 +24,7 @@ export type TestSlots = typeof __propDef.slots;
import { SvelteComponentTyped } from 'svelte';
declare const __propDef: {
props: {
astring: string;
astring?: string;
};
events: {
event: CustomEvent<any>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script>
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring;
import { createEventDispatcher } from 'svelte';
/**
* @type {string}
*/
export const astring = 'potato';
const dispatch = createEventDispatcher();
dispatch('event', true);
const dispatch = createEventDispatcher();
dispatch('event', true);
</script>

<slot {astring} />
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script>
import { createEventDispatcher } from 'svelte';
export const astring;
const dispatch = createEventDispatcher();
dispatch('event', true);
import { createEventDispatcher } from 'svelte';
export const astring = 'potato';
const dispatch = createEventDispatcher();
dispatch('event', true);
</script>

<slot {astring} />
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SvelteComponentTyped } from 'svelte';
declare const __propDef: {
props: {
astring: string;
astring?: string;
};
events: {
event: CustomEvent<boolean>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<script>
export let foo;
export let foo;
</script>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts">
import { createEventDispatcher } from 'svelte';
export const astring: string;
import { createEventDispatcher } from 'svelte';
export const astring: string = 'potato';
const dispatch = createEventDispatcher<{ event: boolean }>();
dispatch('event', true);
const dispatch = createEventDispatcher<{ event: boolean }>();
dispatch('event', true);
</script>

<slot {astring} />
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script lang="ts">
import type { Foo } from './foo';
export let foo: Foo;
import type { Foo } from './foo';
export let foo: Foo;
</script>
2 changes: 1 addition & 1 deletion packages/kit/src/packaging/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function format(file, content) {
content = JSON.stringify(json);
}
return prettier.format(content, {
parser: file.endsWith('.svelte') ? 'svelte' : file.endsWith('.json') ? 'json' : 'babel-ts',
parser: file.endsWith('.svelte') ? 'svelte' : file.endsWith('.json') ? 'json' : 'typescript',
plugins: ['prettier-plugin-svelte']
});
}
Expand Down

0 comments on commit 7f81340

Please sign in to comment.