-
-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: disambiguate render
in module script
#2667
Merged
dummdidumm
merged 16 commits into
sveltejs:master
from
paoloricciuti:disambiguate-render-module
Feb 12, 2025
Merged
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
1f771d6
fix: disambiguate `render` in module script
paoloricciuti 1215830
fix: it should work with no module too
paoloricciuti 1385a9e
chore: rename expected tests
paoloricciuti ffae796
chore: only run in v5
paoloricciuti 3fe7d91
chore: weird test
paoloricciuti d8609c4
fix: rename function to `$$render`
paoloricciuti 0cdfc17
fix: rewrite tests
paoloricciuti a3c176a
Merge remote-tracking branch 'upstream/master' into disambiguate-rend…
paoloricciuti a160df6
chore: fix snippet hoisting v4 test
paoloricciuti a822560
chore: export global `RENDER_NAME`
paoloricciuti d8d889c
chore: duh
paoloricciuti 982415e
fix: use `RENDER_NAME` in language server
paoloricciuti 000af81
chore: duh
paoloricciuti ea426a6
chore: remove extra spaces from mappings
paoloricciuti 2766993
chore: move `renderName` to `internalHelpers`
paoloricciuti 7b36ca2
Update packages/svelte2tsx/package.json
dummdidumm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
|
@@ -195,3 +195,5 @@ export namespace InternalHelpers { | |
paramsPath: string; | ||
} | ||
} | ||
|
||
export const RENDER_NAME:string; | ||
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 |
---|---|---|
@@ -1,8 +1,11 @@ | ||
<input bind:value={get, set} /> | ||
<input bind:value={() => v, new_v => v = new_v} /> | ||
<script module lang="ts"> | ||
let foo = true; | ||
</script> | ||
|
||
<div bind:clientWidth={null, set} /> | ||
<div bind:contentRect={null, set} /> | ||
{#snippet hoistable1()} | ||
<div>hello</div> | ||
{/snippet} | ||
|
||
<Input bind:value={get, set} /> | ||
<Input bind:value={() => v, new_v => v = new_v} /> | ||
{#snippet hoistable2()} | ||
<div>{foo}</div> | ||
{/snippet} |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export { svelte2tsx } from './svelte2tsx'; | ||
export { svelte2tsx, RENDER_NAME } from './svelte2tsx'; | ||
export { emitDts } from './emitDts'; | ||
export { internalHelpers } from './helpers'; |
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
2 changes: 1 addition & 1 deletion
2
...s/svelte2tsx/test/emitDts/samples/typescript-declarationMap/expected/Test.svelte.d.ts.map
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we expose this from a sub module, or via the helpers object that is not subject to semver? Wanna make sure that the "public public" API stays clean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah better...just did it in a new commit