0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00
Commit Graph

19 Commits

Author SHA1 Message Date
Rich Harris
2cefd785a4
fix: make ownership validation work with HMR (#11171)
* fix: make ownership validation work with HMR

* bump vite-plugin-svelte in playground

* missed a spot
2024-04-14 15:14:46 -04:00
Jeremiasz Major
0cf2e98322
chore: upgrade eslint to v9 (#11108) 2024-04-10 16:02:03 -07:00
Dominic Gannaway
afe1d11a5b
feat: hot module reloading support for Svelte 5 (#11106)
* feat: hot module reloading support for Svelte 5

* fix lockfile

* tweaks

* types

* lint

* lint

* tweaks

* add hmr flag

* tweak

* tweaks

* move HMR logic into its own module

* simplify

* tidy up types

* fix test

* lint

* need some indirection here or references break

* prevent transitions during HMR update

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
2024-04-10 16:00:37 -04:00
dependabot[bot]
b2892b02e1
chore(deps-dev): bump vite from 5.0.12 to 5.0.13 (#11054)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.12 to 5.0.13.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.0.13/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.0.13/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-03 14:07:26 -04:00
dependabot[bot]
dbd111762d
chore(deps-dev): bump express from 4.18.2 to 4.19.2 (#10932)
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-25 19:00:47 -04:00
Rich Harris
7a17e21f8a
chore: remove managed_effect (#10926)
* chore: remove managed_effect

* remove managed_pre_effect
2024-03-25 16:55:01 -04:00
Simon H
2755401034
breaking: remove createRoot, adjust mount/hydrate APIs, introduce unmount (#10516)
* breaking: remove `createRoot`, adjust `mount`/`hydrate` APIs, introduce `unmount`

closes #9827

* Update packages/svelte/src/internal/client/runtime.js

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>

---------

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
2024-02-18 07:52:56 -05: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
Simon H
72ff5366de
feat: add hydrate method, make hydration treeshakeable (#10497)
* feat: add hydrate method, make hydration treeshakeable

Introduces a new `hydrate` method which does hydration. Refactors code so that hydration-related code is treeshaken out when not using that method.
closes #9533
part of #9827

* get docs building

* ugh

* one more

* Update packages/svelte/scripts/check-treeshakeability.js

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>

* warn

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

---------

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2024-02-17 11:25:18 -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
dependabot[bot]
9babce9105
chore(deps-dev): bump vite from 4.5.0 to 4.5.1 (#9800)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.5.1/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.1/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-05 21:01:24 -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
Dominik G
5619cd9bfc
chore: update playgrounds/demo (#9666)
* chore: update playgrounds/demo to exclude svelte from being optimized and generate an App.svelte so first run doesn't throw

* chore: fix format
2023-11-27 08:34:06 -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
gtmnayan
fe47621874
chore: fix another playground path (#9144) 2023-08-26 13:51:32 +02:00
Ben McCann
3c9e661f4a
fix: update paths for playground (#9139) 2023-08-24 12:46:20 +05:45
Ben McCann
3d3680cd11
chore: move playground (#9131) 2023-08-22 15:00:33 -07:00