-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
(feat) rewrite svelte2tsx #1237
Merged
Merged
Changes from 84 commits
Commits
Show all changes
104 commits
Select commit
Hold shift + click to select a range
09205d0
(feat) rewrite svelte2tsx
12f6ca2
debug update
37e7a96
fix: don't hand Style/Script attributes
0d5526a
if/else support
2ab4748
add missing shims
f86523e
handle each
260df70
handle mustache tags in markup
0489f90
make tests generate new versions
9900099
generate ts/js, not jsx/tsx
38d65f0
add test outputs that are correct already
840e5d0
await support
4a849f6
create svelte namespace alias for less confusion when errors or hover…
ee3f1dd
refine API a little - new option for mode instead of new setting, typ…
8804d9e
support action/animation/transition directives
ff31a8c
fix action/animation/transitions: add shims, handle no params case di…
65d444a
support key,debug,html
e451db5
adjust transform util: replace overwritten content with one whitespac…
51b0bcb
support class, binding
9cf937f
transform shorthands to property shorthands for better source mapping…
85bf360
options/window/head/body svelte element support
51e4fef
support slot tag
1408f8c
support slot let
8c80637
Merge branch 'master' into svelte2tsx-rewrite
732662f
fix mappings
7449447
support svelteself/sveltecomponent
66add32
better svelte:component/self handling, tests
4214e0c
fix animation/transition params case
2077646
quotes fix
704ff92
css custom properties, multiple/empty attr fix
6e63f16
fix "used before defined" edge case error when let:x {x} used on same…
1869f3b
fix auto-closing
7144ef0
fix EachBlock startEnd
e9b9fd7
document limitation of each/await transformation
7766e86
handle empty script/style tags
0130e4d
handle namespaced attributes
c86788f
move test
fee80d1
handle event modifiers
6182956
fix default slot positioning + sveltefragment
be56c9c
module script processing
d0a0b23
text finetuning
18d3cd7
fix autocompletion for last attr of node
0f22a7f
Merge branch 'master' into svelte2tsx-rewrite
ee17d6b
several fixes: wrap html with async lambda for await, adjust class,ea…
465c5aa
fix each block edge case, dont add unused consts, adjust node-utils f…
f0b8892
more fixes
508cdc7
tests
a511009
tests
6028c30
Merge branch 'master' into svelte2tsx-rewrite
b724c47
ignore samples
7cc11bc
test
d0bc000
fix attribute error + helpers + tests
d0aff56
Merge branch 'master' into svelte2tsx-rewrite
d7e7a68
Merge branch 'master' into svelte2tsx-rewrite
d996715
Merge branch 'master' into svelte2tsx-rewrite
b53ad68
add config to enable/disable new transformation, disabled by default
7eebe2c
better mapping for on:xx on html elements
5c8cf93
tests
d8cc465
fix
e0a0148
fix
f6cb638
Merge branch 'master' into svelte2tsx-rewrite
de9e546
tests
c20d273
better event name mapping
c28296e
update diagnostic tests so that they can run both new and old transfo…
007d0f1
update test
541f286
Fix await block transformation to deal with cases mentioned in its fu…
195da86
handle each block shadowing and ensure it's an arraylike
54567b2
fix typing to any else TS will create a weird type
aee8fd0
remap "missing prop" error
5183973
Merge branch 'master' into svelte2tsx-rewrite
9361888
Merge branch 'master' into svelte2tsx-rewrite
bcb991d
Add support for StyleDirective and ConstTag, fix some bugs
dea6cb7
ensure test doesn't mess with other tests
627584d
adjust renameprovider
f8f4863
ensure test is not flaky
d4f3c03
fix html attribute util
74fa41d
fix jsx
6d50025
lint
efeb165
cleanup
3533b3c
ensure no shims appear in definitions
8813a0f
code actions tests for new and old
5bee32d
completion tests for old and new
fb32450
find references tests for old and new
81aa288
hover provider tests for old and new
dbf1187
lint
3e81db8
handle spread
90512c4
better event name mapping
fc680aa
fix typo
2ba6c59
fix regex
1c0ee88
simplify selfclosing logic
6faa3f8
add missing expectedv2 files
aae863b
map component end tag
51106ac
add support for namespacing createElement, default namespace is svelt…
5a7d824
better document symbols for new transformation
32ec15d
fix tests
c4a7e8a
update typescript plugin to use new version, bump svelte2tsx version
d620ab6
lint
61bfc07
lint, try fix tests
fc57843
comment out part of test
46db627
no semantic highlighting for on:event
b984540
ensure whitespace is mapped to props/attrs for better completion
ffd2c8f
tests
cefd1ca
better slot name mapping
f442854
fix dev script
3063337
deduplicate html tag completions
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
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
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
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.
This is used to determine whether or not to use the new transformation. My idea is to go into a month-long beta phase where this is
false
by default and we encourage people to switch it on to try it out. After that we toggle it totrue
by default and then see what the feedback is. If everything is good, we can remove it ~2 months afterwards and remove all the old code, simplifying the code base.This boolean is used in a few places in some Providers to do something differently.