gtmnayan
202d119e9a
chore: convert puppeteer tests to playwright ( #8577 )
1 year ago
Yuichiro Yamashita
b6a400a549
chore: add prettier ( #8543 )
1 year ago
Yuichiro Yamashita
384927dbf3
chore: TypeScript to JavaScript + JSDoc for tests ( #8526 )
1 year ago
Tan Li Hau
df2f656557
feat: improve hydration, claim static html elements using innerHTML instead of deopt to claiming every nodes ( #7426 )
...
Related: #7341 , #7226
For purely static HTML, instead of walking the node tree and claiming every node/text etc, hydration now uses the same innerHTML optimization technique for hydration compared to normal create. It uses a new data-svelte-h attribute which is added upon server side rendering containing a hash (computed at build time), and then comparing that hash in the client to ensure it's the same node. If the hash is the same, the whole child content is expected to be the same. If the hash is different, the whole child content is replaced with innerHTML.
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
1 year ago
Tan Li Hau
e8b4997bb5
[fix] duplicate meta tags during hydration ( #7941 )
2 years ago
Maximiliano Ruani
8ffc8fd77b
[fix] Fix hydration duplicate `svelte:head` tag issue with `@html` expressions and nested components ( #7745 )
...
* Fix hydration duplicate `svelte:head` tag issue with `@html` and nested components #7444 #6463
* - Changed comment style to HEAD_${head_id}_START and HEAD_${head_id}_END
- Improved claim logic
- Changed tests accordingly
2 years ago
Maurício Kishi
f8605d6acb
[fix] harden attribute escaping during ssr ( #7530 )
2 years ago
Yosuke Ota
3a238fe057
[fix] strip leading newline after `<pre>` and `<textarea>` ( #7280 )
...
Fixes #7264
2 years ago
Yuichiro Yamashita
e0d93254fd
[feature] Dynamic elements implementation <svelte:element> ( #6898 )
...
Closes #2324
Co-authored-by: Alfred Ringstad <alfred.ringstad@hyperlab.se>
Co-authored-by: Simon Holthausen <simon.holthausen@accso.de>
Co-authored-by: tanhauhau <lhtan93@gmail.com>
2 years ago
Maurício Kishi
cdd3575026
[fix] attribute escaping during ssr ( #7333 )
...
Fixes #7327 and a related security issue
3 years ago
Yosuke Ota
7463d51301
[fix]: keep space in `<pre>` or when `preserveWhitespace: true` ( #6990 )
...
Fixes #6437
Fixes #4731
Closes #4737
Whitespace is now untouched inside <pre> tag and other tags if preserveWhitespace is true
3 years ago
Tan Li Hau
815bc7ef6e
fix: test cases should fail when it should fail ( #7139 )
3 years ago
Yuichiro Yamashita
966c03a317
[chore] fix test flakiness ( #7076 )
3 years ago
Conduitry
67b53bfe6d
[fix] prefer context from constructor options ( #6759 )
3 years ago
Tan Li Hau
f25a995f7b
collapse whitespace in class and style attributes ( #6613 )
3 years ago
Tan Li Hau
2818567925
fix input value 0 for ssr ( #6458 )
3 years ago
Jonnie
7bcbe67939
add ssr for group bindings ( #4621 )
...
* add ssr for group bindings
* remove unnecessary chunk length check
* check if checkbox or radio
Co-authored-by: tanhauhau <lhtan93@gmail.com>
3 years ago
Luis Confraria
554d5dd391
Fix preserveComments on ssr ( #4736 )
...
Fixes #4730
Co-authored-by: tanhauhau <lhtan93@gmail.com>
3 years ago
Tan Li Hau
bce3641e92
fix escaping attributes in spread in SSR ( #6429 )
3 years ago
Tan Li Hau
02b49a1bb4
implement passing CSS custom properties to components ( #6237 )
3 years ago
Tan Li Hau
6c5257beb2
allow passing in context in constructor ( #6032 )
...
Co-authored-by: Conduitry <git@chor.date>
3 years ago
Tan Li Hau
6207596175
fix extraneous store subscription in SSR ( #5929 )
4 years ago
Conduitry
7be0b400f1
fix failing tests by restoring global.window after SSR tests
4 years ago
Ben McCann
229a16d6e7
upgrade ESLint config ( #5472 )
4 years ago
Ben McCann
0645631b28
Use TypeScript in tests ( #5433 )
4 years ago
pushkin
0da70f46b9
handle line ending differences in tests ( #4915 )
4 years ago
Conduitry
455a5cc754
fix hydration of <title> ( #4311 )
5 years ago
Conduitry
7494509dfd
only attach SSR <head> markers when hydratable: true ( #4260 )
5 years ago
Tan Li Hau
b3582c7fb2
fix hydrating <head> ( #4082 )
5 years ago
Jesse Skinner
e3d66869df
fix stringifying of attributes in presence of spread in SSR ( #4247 )
5 years ago
Tan Li Hau
ef56a70acb
SSR should only render one <title> ( #4250 )
5 years ago
Tan Li Hau
140bfd0ce2
write ssr compiled output to disk for easier inspection
5 years ago
Tan Li Hau
d8b9274697
update test snapshot with --update flag
5 years ago
Tan Li Hau
b4c2226438
swapped out expected and actual for asserts in error
5 years ago
Tan Li Hau
8d722ae1aa
look for test folder name for solo mode as well
5 years ago
Conduitry
9f48d1a5fd
fix SSR spread with boolean attributes ( #3797 )
...
* in SSR, adjust spread with boolean attributes (#2916 )
* add tests
* update changelog
5 years ago
Tan Li Hau
5dbb08d19b
allow solo for test suite ( #3747 )
5 years ago
Rich Harris
b9f14846b0
Structured code generation ( #3539 )
5 years ago
pngwn
57aeddcf85
Prevent element property set from throwing errors for readonly properties. Fixes #3681 .
5 years ago
mrkishi
52618594f4
fix .gitignore'd files
5 years ago
James Garbutt
caebe0deb8
Introduce ESLint to svelte sources ( #2958 )
...
* introduce eslint
* add lint npm script
* first eslint run
* use tsc stronger checks for unused vars
* fix strict typescript unused checks
* reintroduce unicode oddities
* revert ordering changes
* revert whitespace changes
* set indent lint rule as error and ignore outliers
* revert some more unicode
* reintroduce scissors unicode again
5 years ago
Efe Küçük
17c4a25016
Render textarea binding values inside element
...
* ssr-textarea-bind-fix
* oops
* trying again
* Fixing an old test
* avoid creating extra function expression
5 years ago
Colin Casey
f0831202d9
Omits readonly attributes from SSR code
...
* move `is_readonly` into the common `Binding` AST class
* prevents the following bindings from being emitted into the SSR code:
* `bind:clientWidth`
* `bind:clientHeight`
* `bind:offsetWidth`
* `bind:offsetHeight`
* `bind:duration`
* `bind:buffered`
* `bind:seekable`
* `bind:played`
* `bind:value` (only for `input` with `type=file`)
5 years ago
Richard Harris
a0e46ffe2d
ensure spring works server-side = fixes #2773
5 years ago
Rich Harris
debf1ce17a
fix tests
5 years ago
Rich Harris
61a96b382a
implement namespaced components
5 years ago
Richard Harris
cc942e963c
update runtime and ssr tests
6 years ago
Rich Harris
206a3d0131
update tests
6 years ago
Rich Harris
687e352209
rename .html files to .svelte
6 years ago
Rich Harris
722e1fd383
get name based on filename
6 years ago