0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-11-22 03:47:27 +01:00
Commit Graph

14 Commits

Author SHA1 Message Date
Rich Harris
e366c49a86
chore: unify sandbox (#13012) 2024-08-26 11:26:45 +02:00
Rich Harris
8ac13f76f1
chore: print compiler warnings when using sandbox (#12793) 2024-08-10 13:32:10 -04:00
Ben McCann
71a4bce9e7
chore: remove a couple of dependencies (#12249) 2024-07-01 14:50:16 -04:00
Ben McCann
ca6e9b5745
chore: validate promise handling (#11842)
* chore: don't swallow rejected promise errors

* ignore rules rather than adding catch blocks. add async to functions returning promises

* remove redundant asyncs

* remove extremely pointless rule

* remove another daft rule

* this is what typescript is for

* again, typescript already has this covered, we don't need it

* simplify

* this rule is harmless

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
2024-06-04 15:26:59 -04:00
Ben McCann
9a86e3b5e6
chore: linting and formatting on a per-package basis (#11834) 2024-05-30 14:37:17 +01:00
Dominic Gannaway
f6b800414d
chore: update run.js to include dev mode on compileModule (#11601) 2024-05-14 01:30:50 +01:00
Dominic Gannaway
b4968584df
fix: improve html escaping of element attributes (#11411)
escape `<` because there's an edge case scenario where a script inside an attribute of a noscript is parsed differently
2024-05-02 17:40:22 +02:00
Simon H
cd798077b4
feat: provide migration function (#11334)
Provides a migration function, exported as `migrate` from `svelte/compiler`, which tries its best to automatically migrate towards runes, render tags (instead of slots) and event attributes (instead of event handlers)

The preview REPL was updated with a migrate button so people can try it out in the playground.

closes #9239
2024-04-26 20:56:40 +02:00
Rich Harris
5605e8cf49
feat: implement support for :is(...) and :where(...) (#10490)
* failing test for :is(...)

* simplify

* trim

* factor out truncate function

* pass stylesheet around

* recurse into :is and :where

* fix types

* fix types

* almost there

* gah so close

* tada

* changeset

* simplify

* feat: nested CSS support (#10491)

* parse nested CSS

* tests

* track parent rules

* some progress

* switch it up

* pruning

* works

* changeset

* lint

* error early on invalid nesting selector

* tidy

* note to self

* fix some specificity stuff

* failing test

* note to self

* fix: correctly scope CSS selectors with descendant combinators (#10502)

* fix traversal, but break some other stuff

* man this is fucken hard

* fixes

* getting closer

* be conservative for now

* tidy

* invert

* invert

* simplify

* switch

* for now

* progress

* i think it works?

* fix

* tidy up

* revert some stuff

* remove some junk

* handle weird cases

* update

* tweak

* shrink

* changeset

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>

* Update playgrounds/sandbox/run.js

* changeset

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
2024-02-17 16:56:03 -05:00
Rich Harris
7c70c346f8
Update deps (#10245)
* bump deps

* migrate

* fix

* downgrade jsdom/playwright

* fix a type error

* downgrade svelte

* prettier

* downgrade rollup

* downgrade other deps

* gah

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
2024-01-19 19:16:18 -05:00
Rich Harris
bde42d5676
$inspect rune (#9705)
* feat: add $log rune

* fix issues

* fix issues

* tune

* avoid static state reference validation

* work around unfortunate browser behavior

* call it ExpectedError

* cleanup

* Fix docs

* tweaks

* tweaks

* lint

* repl, dev: true

* repl dev mode

* Update sites/svelte-5-preview/src/lib/Repl.svelte

* squelch static-state-reference warning

* simplify

* remove redundant code

* Update packages/svelte/src/main/ambient.d.ts

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>

* Update packages/svelte/src/main/ambient.d.ts

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>

* Update packages/svelte/src/main/ambient.d.ts

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>

* only pause/trace on change

* Update packages/svelte/src/main/ambient.d.ts

* Update .changeset/chatty-hotels-grin.md

* Update sites/svelte-5-preview/src/routes/docs/content/01-api/02-runes.md

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>

* $log.break and $log.trace no-op during SSR

* Update sites/svelte-5-preview/src/routes/docs/content/01-api/02-runes.md

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>

* update test

* improve break experience

* fix ts

* remove unnecessary if (DEV) checks - log runes are removed in prod

* ensure hoisting doesnt mess up source maps

* check visited for cyclical values

* rename $log to $inspect, remove children

* custom inspect function

* implement custom inspect functions

* changeset

* update docs

* only fire on change

* lint

* make inspect take a single argument

* ugh eslint

* document console.trace trick

* demos

* fix site

---------

Co-authored-by: Dominic Gannaway <dg@domgan.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Dominic Gannaway <trueadm@users.noreply.github.com>
2023-11-29 14:31:38 -05:00
Rich Harris
d57eff76ed
generate AST first (#9587)
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2023-11-21 11:42:22 -05:00
Rich Harris
755fe33a57
chore: add AST output to sandbox (#9488)
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2023-11-16 09:00:45 -05:00
Simon Holthausen
fe8a9ce31d breaking: init Svelte 5
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
Co-authored-by: Dominic Gannaway <dg@domgan.com>
2023-11-10 15:48:23 +01:00