-
-
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.
(feat) copy package.json functionality, update migration script
closes #9114
- Loading branch information
1 parent
fa18dc5
commit d48bfee
Showing
17 changed files
with
126 additions
and
12 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/package': minor | ||
--- | ||
|
||
feat: add copy package.json functionality |
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-migrate': patch | ||
--- | ||
|
||
fix: use copy-package.json-functionality to fully resemble old way of doing things |
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
12 changes: 12 additions & 0 deletions
12
packages/package/test/fixtures/copy-pkg-json/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 = 'potato'; | ||
const dispatch = createEventDispatcher(); | ||
dispatch('event', true); | ||
</script> | ||
|
||
<slot {astring} /> |
40 changes: 40 additions & 0 deletions
40
packages/package/test/fixtures/copy-pkg-json/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/package/test/fixtures/copy-pkg-json/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'; |
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'; |
14 changes: 14 additions & 0 deletions
14
packages/package/test/fixtures/copy-pkg-json/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,14 @@ | ||
{ | ||
"name": "copy-pkg-json", | ||
"private": true, | ||
"version": "1.0.0", | ||
"description": "test copy-pkg-json option", | ||
"peerDependencies": { | ||
"svelte": "^3.55.0" | ||
}, | ||
"exports": { | ||
".": { | ||
"svelte": "./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 @@ | ||
{} |
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,14 @@ | ||
{ | ||
"name": "copy-pkg-json", | ||
"private": true, | ||
"version": "1.0.0", | ||
"description": "test copy-pkg-json option", | ||
"peerDependencies": { | ||
"svelte": "^3.55.0" | ||
}, | ||
"exports": { | ||
".": { | ||
"svelte": "./index.js" | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/package/test/fixtures/copy-pkg-json/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 = 'potato'; | ||
const dispatch = createEventDispatcher(); | ||
dispatch('event', true); | ||
</script> | ||
|
||
<slot {astring} /> |
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.
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