-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat: functional template generation #15538
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
86 commits
Select commit
Hold shift + click to select a range
de8a38b
feat: templateless template generation
paoloricciuti 575908a
fix: auto import fumble
paoloricciuti 8a737f1
feat: add option `preventTemplateCloning` and functions transformation
paoloricciuti 7c7a857
feat: make all tests pass with functional templates
paoloricciuti 8424395
chore: remove `prevent-template-cloning` test
paoloricciuti c75c429
chore: run test suite on both `functional` and `string` templating
paoloricciuti 64219ed
chore: change options from `boolean` to `list` (templatingMode: "func…
paoloricciuti 95ce311
chore: revert unneeded change to `package.json`
paoloricciuti 59902cc
chore: simplify `process_children`
paoloricciuti 132ea2b
Merge remote-tracking branch 'origin/main' into templateless-template…
paoloricciuti 403b17e
chore: update snapshots
paoloricciuti ba237c7
chore: don't write different `rendered`
paoloricciuti 4daa63a
fix: snapshot test runner
paoloricciuti 72f93e3
chore: sprinkle comments here and there
paoloricciuti ad56847
fix: silly goose am i 🪿
paoloricciuti d8afd8e
fix (this broke the sandbox)
Rich-Harris a48df4a
Merge remote-tracking branch 'origin/main' into templateless-template…
paoloricciuti be39867
chore: alterative functional templating syntax (#15599)
paoloricciuti eaf2aaf
Merge branch 'main' into templateless-template-generation
Rich-Harris 97817a9
fix snapshot tests
Rich-Harris 15c6306
Merge remote-tracking branch 'origin/main' into templateless-template…
paoloricciuti 084f7f9
chore: update purity snapshot
paoloricciuti 084e313
chore: update purity snapshot, this time in the proper way
paoloricciuti d294a66
chore: add `each-index-non-null` snapshot
paoloricciuti 2d0db55
Merge remote-tracking branch 'origin/main' into templateless-template…
paoloricciuti 7f732bf
chore: remove export of `seen`
paoloricciuti d3ee992
fix: revert exporting `seen`
paoloricciuti 2e24fdc
chore: use more sane to-string code
paoloricciuti 67183ce
Merge branch 'main' into templateless-template-generation
Rich-Harris 173a7f7
update snapshots
Rich-Harris d9d24a2
this is already copied, no need to do it explicitly
Rich-Harris 5b1f5e5
do the escaping inside `template_to_string`
Rich-Harris 1c4503c
Apply suggestions from code review
Rich-Harris e81c669
chore: refactor `to-functions` to be sane
paoloricciuti 324bd8a
use proper discriminated unions (TODO replace args with node-specific…
Rich-Harris 4a3fc9d
remove instruction.args
Rich-Harris 76d05e0
make process_children unaware of templating mode - the less visitors …
Rich-Harris 22cf914
generate functional output in sandbox
Rich-Harris a9f2d6f
tidy up
Rich-Harris 36c01ca
fix
Rich-Harris 68de6b4
no longer need to pass `is_functional_template_mode` to `clean_nodes`
Rich-Harris d9237e2
simplify state
Rich-Harris 17f1b6a
WIP
Rich-Harris 1e6d85b
fixes
Rich-Harris f677792
fix
Rich-Harris a59f18a
fix
Rich-Harris 8c819e5
unused
Rich-Harris 448cff1
remove indirection
Rich-Harris 747d24a
lint
Rich-Harris 60813bc
tweak
Rich-Harris 3afd814
tweak
Rich-Harris 9106533
doh
Rich-Harris 310f82d
move stuff off `state.metadata.context` and onto `state.template`
Rich-Harris 98fa3c0
simplify
Rich-Harris f36df5f
remove unused arg
Rich-Harris ab5f15c
tweak
Rich-Harris bcc11ce
tweak
Rich-Harris 92cc175
merge main
Rich-Harris af78465
unused
Rich-Harris 40be734
put locations on template, instead of on the side
Rich-Harris 7edf0c2
simplify
Rich-Harris 941f266
simplify
Rich-Harris faf1822
optimise for the common case
Rich-Harris d8637fb
tweak
Rich-Harris 84f15d0
tweak
Rich-Harris 1be9120
tweak
Rich-Harris 07aed41
colocate
Rich-Harris 4039f9e
remove test duplication
Rich-Harris 546fa28
more
Rich-Harris 93c4d84
tweak
Rich-Harris 99b7afc
undo
Rich-Harris 78e3405
undo
Rich-Harris 0cb475e
undo
Rich-Harris f432305
one snapshot test is probably enough
Rich-Harris 32d2b4c
add a runtime test, we can always add more later if we need to
Rich-Harris 19fae20
push on create
Rich-Harris 408955d
rename stuff
Rich-Harris 7d1551b
use function composition
Rich-Harris fa8e1ef
simplify
Rich-Harris dfde459
deduplicate stuff
Rich-Harris 4ba3853
update names
Rich-Harris 5884b8f
small tweak
Rich-Harris a86e52b
XHTML compliance
Rich-Harris 27848a5
update snapshots
Rich-Harris 7ac936f
update sandbox
Rich-Harris 5a748f9
fix tests
Rich-Harris 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
feat: make all tests pass with functional templates
- Loading branch information
commit 7c7a85754be206bdc57db8cf972e441cb0eba5ab
There are no files selected for viewing
10000
This file contains hidden or 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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
'svelte': minor | ||
--- | ||
|
||
feat: templateless template generation | ||
feat: functional template generation |
18 changes: 18 additions & 0 deletions
18
.../svelte/src/compiler/phases/3-transform/client/transform-template/fix-attribute-casing.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.