-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] preserve user defined config and files on
svelte-kit package
(#…
- Loading branch information
1 parent
34d2049
commit 868f97a
Showing
49 changed files
with
487 additions
and
49 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 | ||
--- | ||
|
||
Preserve README casing and package.json contents on 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
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
1 change: 1 addition & 0 deletions
1
packages/kit/src/core/make_package/test/fixtures/casing/ReadMe.md
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 @@ | ||
Hello |
1 change: 1 addition & 0 deletions
1
packages/kit/src/core/make_package/test/fixtures/casing/expected/ReadMe.md
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 @@ | ||
Hello |
12 changes: 12 additions & 0 deletions
12
packages/kit/src/core/make_package/test/fixtures/casing/expected/Test.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,12 @@ | ||
<script> | ||
import { createEventDispatcher } from 'svelte'; | ||
/** | ||
* @type {string} | ||
*/ | ||
export const astring; | ||
const dispatch = createEventDispatcher(); | ||
dispatch('event', true); | ||
</script> | ||
|
||
<slot {astring} /> |
40 changes: 40 additions & 0 deletions
40
packages/kit/src/core/make_package/test/fixtures/casing/expected/Test.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,40 @@ | ||
/** @typedef {typeof __propDef.props} TestProps */ | ||
/** @typedef {typeof __propDef.events} TestEvents */ | ||
/** @typedef {typeof __propDef.slots} TestSlots */ | ||
export default class Test extends SvelteComponentTyped< | ||
{ | ||
astring: string; | ||
}, | ||
{ | ||
event: CustomEvent<any>; | ||
} & { | ||
[evt: string]: CustomEvent<any>; | ||
}, | ||
{ | ||
default: { | ||
astring: string; | ||
}; | ||
} | ||
> { | ||
get astring(): string; | ||
} | ||
export type TestProps = typeof __propDef.props; | ||
export type TestEvents = typeof __propDef.events; | ||
export type TestSlots = typeof __propDef.slots; | ||
import { SvelteComponentTyped } from 'svelte'; | ||
declare const __propDef: { | ||
props: { | ||
astring: string; | ||
}; | ||
events: { | ||
event: CustomEvent<any>; | ||
} & { | ||
[evt: string]: CustomEvent<any>; | ||
}; | ||
slots: { | ||
default: { | ||
astring: string; | ||
}; | ||
}; | ||
}; | ||
export {}; |
1 change: 1 addition & 0 deletions
1
packages/kit/src/core/make_package/test/fixtures/casing/expected/index.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 @@ | ||
export { default as Test } from './Test.svelte'; |
1 change: 1 addition & 0 deletions
1
packages/kit/src/core/make_package/test/fixtures/casing/expected/index.js
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 @@ | ||
export { default as Test } from './Test.svelte'; |
12 changes: 12 additions & 0 deletions
12
packages/kit/src/core/make_package/test/fixtures/casing/expected/package.json
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,12 @@ | ||
{ | ||
"name": "casing", | ||
"version": "1.0.0", | ||
"description": "package-casing-test", | ||
"type": "module", | ||
"exports": { | ||
"./package.json": "./package.json", | ||
"./index.js": "./index.js", | ||
"./Test.svelte": "./Test.svelte", | ||
".": "./index.js" | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/kit/src/core/make_package/test/fixtures/casing/jsconfig.json
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,9 @@ | ||
{ | ||
"compilerOptions": { | ||
"checkJs": true, | ||
"paths": { | ||
"$lib/*": ["src/lib/*"] | ||
} | ||
}, | ||
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"] | ||
} |
5 changes: 5 additions & 0 deletions
5
packages/kit/src/core/make_package/test/fixtures/casing/package.json
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 @@ | ||
{ | ||
"name": "casing", | ||
"version": "1.0.0", | ||
"description": "package-casing-test" | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/kit/src/core/make_package/test/fixtures/casing/src/app.html
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,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
%svelte.head% | ||
</head> | ||
<body> | ||
<div id="svelte">%svelte.body%</div> | ||
</body> | ||
</html> |
12 changes: 12 additions & 0 deletions
12
packages/kit/src/core/make_package/test/fixtures/casing/src/lib/Test.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,12 @@ | ||
<script> | ||
import { createEventDispatcher } from 'svelte'; | ||
/** | ||
* @type {string} | ||
*/ | ||
export const astring; | ||
const dispatch = createEventDispatcher(); | ||
dispatch('event', true); | ||
</script> | ||
|
||
<slot {astring} /> |
1 change: 1 addition & 0 deletions
1
packages/kit/src/core/make_package/test/fixtures/casing/src/lib/index.js
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 @@ | ||
export { default as Test } from './Test.svelte'; |
Empty file.
12 changes: 12 additions & 0 deletions
12
packages/kit/src/core/make_package/test/fixtures/exports/expected/Test.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,12 @@ | ||
<script> | ||
import { createEventDispatcher } from 'svelte'; | ||
/** | ||
* @type {string} | ||
*/ | ||
export const astring; | ||
const dispatch = createEventDispatcher(); | ||
dispatch('event', true); | ||
</script> | ||
|
||
<slot {astring} /> |
40 changes: 40 additions & 0 deletions
40
packages/kit/src/core/make_package/test/fixtures/exports/expected/Test.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,40 @@ | ||
/** @typedef {typeof __propDef.props} TestProps */ | ||
/** @typedef {typeof __propDef.events} TestEvents */ | ||
/** @typedef {typeof __propDef.slots} TestSlots */ | ||
export default class Test extends SvelteComponentTyped< | ||
{ | ||
astring: string; | ||
}, | ||
{ | ||
event: CustomEvent<any>; | ||
} & { | ||
[evt: string]: CustomEvent<any>; | ||
}, | ||
{ | ||
default: { | ||
astring: string; | ||
}; | ||
} | ||
> { | ||
get astring(): string; | ||
} | ||
export type TestProps = typeof __propDef.props; | ||
export type TestEvents = typeof __propDef.events; | ||
export type TestSlots = typeof __propDef.slots; | ||
import { SvelteComponentTyped } from 'svelte'; | ||
declare const __propDef: { | ||
props: { | ||
astring: string; | ||
}; | ||
events: { | ||
event: CustomEvent<any>; | ||
} & { | ||
[evt: string]: CustomEvent<any>; | ||
}; | ||
slots: { | ||
default: { | ||
astring: string; | ||
}; | ||
}; | ||
}; | ||
export {}; |
1 change: 1 addition & 0 deletions
1
packages/kit/src/core/make_package/test/fixtures/exports/expected/index.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 @@ | ||
export { default as Test } from './Test.svelte'; |
1 change: 1 addition & 0 deletions
1
packages/kit/src/core/make_package/test/fixtures/exports/expected/index.js
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 @@ | ||
export { default as Test } from './Test.svelte'; |
6 changes: 6 additions & 0 deletions
6
packages/kit/src/core/make_package/test/fixtures/exports/expected/internal/Test.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,6 @@ | ||
<script> | ||
/** | ||
* @type {import('./foo').Foo} | ||
*/ | ||
export let foo; | ||
</script> |
26 changes: 26 additions & 0 deletions
26
packages/kit/src/core/make_package/test/fixtures/exports/expected/internal/Test.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} Test2Props */ | ||
/** @typedef {typeof __propDef.events} Test2Events */ | ||
/** @typedef {typeof __propDef.slots} Test2Slots */ | ||
export default class Test2 extends SvelteComponentTyped< | ||
{ | ||
foo: boolean; | ||
}, | ||
{ | ||
[evt: string]: CustomEvent<any>; | ||
}, | ||
{} | ||
> {} | ||
export type Test2Props = typeof __propDef.props; | ||
export type Test2Events = typeof __propDef.events; | ||
export type Test2Slots = typeof __propDef.slots; | ||
import { SvelteComponentTyped } from 'svelte'; | ||
declare const __propDef: { | ||
props: { | ||
foo: import('./foo').Foo; | ||
}; | ||
events: { | ||
[evt: string]: CustomEvent<any>; | ||
}; | ||
slots: {}; | ||
}; | ||
export {}; |
1 change: 1 addition & 0 deletions
1
packages/kit/src/core/make_package/test/fixtures/exports/expected/internal/foo.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 @@ | ||
export type Foo = boolean; |
12 changes: 12 additions & 0 deletions
12
packages/kit/src/core/make_package/test/fixtures/exports/expected/package.json
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,12 @@ | ||
{ | ||
"name": "exports", | ||
"version": "1.0.0", | ||
"description": "package-exports-test", | ||
"exports": { | ||
".": { | ||
"import": "./index.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"type": "module" | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/kit/src/core/make_package/test/fixtures/exports/jsconfig.json
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,9 @@ | ||
{ | ||
"compilerOptions": { | ||
"checkJs": true, | ||
"paths": { | ||
"$lib/*": ["src/lib/*"] | ||
} | ||
}, | ||
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"] | ||
} |
10 changes: 10 additions & 0 deletions
10
packages/kit/src/core/make_package/test/fixtures/exports/package.json
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,10 @@ | ||
{ | ||
"name": "exports", | ||
"version": "1.0.0", | ||
"description": "package-exports-test", | ||
"exports": { | ||
".": { | ||
"import": "./index.js" | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/kit/src/core/make_package/test/fixtures/exports/src/app.html
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,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
%svelte.head% | ||
</head> | ||
<body> | ||
<div id="svelte">%svelte.body%</div> | ||
</body> | ||
</html> |
12 changes: 12 additions & 0 deletions
12
packages/kit/src/core/make_package/test/fixtures/exports/src/lib/Test.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,12 @@ | ||
<script> | ||
import { createEventDispatcher } from 'svelte'; | ||
/** | ||
* @type {string} | ||
*/ | ||
export const astring; | ||
const dispatch = createEventDispatcher(); | ||
dispatch('event', true); | ||
</script> | ||
|
||
<slot {astring} /> |
1 change: 1 addition & 0 deletions
1
packages/kit/src/core/make_package/test/fixtures/exports/src/lib/index.js
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 @@ | ||
export { default as Test } from './Test.svelte'; |
6 changes: 6 additions & 0 deletions
6
packages/kit/src/core/make_package/test/fixtures/exports/src/lib/internal/Test.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,6 @@ | ||
<script> | ||
/** | ||
* @type {import('./foo').Foo} | ||
*/ | ||
export let foo; | ||
</script> |
1 change: 1 addition & 0 deletions
1
packages/kit/src/core/make_package/test/fixtures/exports/src/lib/internal/foo.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 @@ | ||
export type Foo = boolean; |
Empty file.
12 changes: 12 additions & 0 deletions
12
packages/kit/src/core/make_package/test/fixtures/nested/expected/Test.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,12 @@ | ||
<script> | ||
import { createEventDispatcher } from 'svelte'; | ||
/** | ||
* @type {string} | ||
*/ | ||
export const astring; | ||
const dispatch = createEventDispatcher(); | ||
dispatch('event', true); | ||
</script> | ||
|
||
<slot {astring} /> |
Oops, something went wrong.