Skip to content

Commit

Permalink
Merge pull request #11161 from sveltejs/version-2
Browse files Browse the repository at this point in the history
SvelteKit 2.0
  • Loading branch information
Rich-Harris authored Dec 14, 2023
2 parents 0f71007 + 234eab6 commit c8a637d
Show file tree
Hide file tree
Showing 342 changed files with 6,436 additions and 4,458 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-brooms-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: remove top-level promise awaiting
5 changes: 5 additions & 0 deletions .changeset/calm-pugs-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: prevent use of dynamic env vars during prerendering, serve env vars dynamically
5 changes: 5 additions & 0 deletions .changeset/chilled-fireants-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: remove deprecated `use:enhance` callback values
5 changes: 5 additions & 0 deletions .changeset/clean-cars-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: turn `error` and `redirect` into commands
5 changes: 5 additions & 0 deletions .changeset/dirty-phones-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: the type for `depends` now requires a `:` as part of the string
5 changes: 5 additions & 0 deletions .changeset/dull-eyes-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sveltejs/kit": major
---

breaking: remove baseUrl fallback from generated tsconfig
5 changes: 5 additions & 0 deletions .changeset/eight-pens-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: fail if route with +page and +server is marked prerenderable
5 changes: 5 additions & 0 deletions .changeset/eighty-scissors-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: remove `resolvePath` in favour of `resolveRoute` from `$app/paths`
6 changes: 6 additions & 0 deletions .changeset/fast-dolls-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@sveltejs/adapter-vercel': major
'@sveltejs/adapter-node': major
---

breaking: require SvelteKit 2 peer dependency
5 changes: 5 additions & 0 deletions .changeset/fast-eyes-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sveltejs/kit": minor
---

feat: add untrack to load
5 changes: 5 additions & 0 deletions .changeset/flat-clocks-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-vercel': minor
---

feat: expose vercel image optimization config in adapter config
5 changes: 5 additions & 0 deletions .changeset/gentle-guests-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: drop support for Svelte 3
5 changes: 5 additions & 0 deletions .changeset/good-jars-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

fix: prerender optional parameters as empty when `entries` contains `'*'`
5 changes: 5 additions & 0 deletions .changeset/grumpy-sheep-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: require Vite 5.0.3+
5 changes: 5 additions & 0 deletions .changeset/happy-beds-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: generate `__data.json` files as sibling to `.html` files
5 changes: 5 additions & 0 deletions .changeset/hot-pumas-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-svelte': minor
---

feat: update vitest to 1.0
12 changes: 12 additions & 0 deletions .changeset/hungry-kings-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'@sveltejs/adapter-cloudflare-workers': minor
'@sveltejs/adapter-cloudflare': minor
'@sveltejs/adapter-netlify': minor
'@sveltejs/adapter-static': minor
'@sveltejs/adapter-vercel': minor
'@sveltejs/adapter-auto': minor
'@sveltejs/adapter-node': minor
'@sveltejs/amp': minor
---

feat: allow SvelteKit 2 as peer dependency
5 changes: 5 additions & 0 deletions .changeset/hungry-moles-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-cloudflare-workers': patch
---

fix: declare the adapter plugin options as optional
5 changes: 5 additions & 0 deletions .changeset/light-moons-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sveltejs/kit": minor
---

feat: implement shallow routing
5 changes: 5 additions & 0 deletions .changeset/loud-parrots-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"svelte-migrate": minor
---

feat: add sveltekit v2 migration
5 changes: 5 additions & 0 deletions .changeset/loud-plants-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: fail if +page and +server have mismatched config
5 changes: 5 additions & 0 deletions .changeset/mean-moose-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: error if form without multipart/form-data enctype contains a file input
5 changes: 5 additions & 0 deletions .changeset/mean-trees-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

fix: resolve route config correctly
5 changes: 5 additions & 0 deletions .changeset/neat-hats-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

fix: import Svelte types from svelte/compiler
5 changes: 5 additions & 0 deletions .changeset/nervous-bananas-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: require paths pass to preloadCode to be prefixed with basepath
5 changes: 5 additions & 0 deletions .changeset/nervous-cups-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-node': minor
---

chore: upgrade rollup
5 changes: 5 additions & 0 deletions .changeset/nervous-snails-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: `@sveltejs/vite-plugin-svelte` is now a peer dependency and will need to be installed in each project using SvelteKit
5 changes: 5 additions & 0 deletions .changeset/nine-moles-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: stop re-exporting vitePreprocess
5 changes: 5 additions & 0 deletions .changeset/old-rockets-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

fix: reset invalid resources after a successful invalidation
5 changes: 5 additions & 0 deletions .changeset/pink-lobsters-protect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-static': major
---

breaking: update SvelteKit peer dependency to version 2
5 changes: 5 additions & 0 deletions .changeset/poor-parrots-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: require path option when setting/deleting/serializing cookies
5 changes: 5 additions & 0 deletions .changeset/real-pets-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sveltejs/kit": major
---

breaking: tighten up error handling
5 changes: 5 additions & 0 deletions .changeset/rotten-penguins-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-node': major
---

breaking: remove polyfill option. fetch APIs will now always come from the platform being used. File and crypto APIs will be polyfilled if not available
5 changes: 5 additions & 0 deletions .changeset/serious-months-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sveltejs/kit": major
---

breaking: remove state option from goto in favor of shallow routing
5 changes: 5 additions & 0 deletions .changeset/shy-trees-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-svelte': major
---

feat: create projects with SvelteKit 2
8 changes: 8 additions & 0 deletions .changeset/silent-donuts-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@sveltejs/adapter-cloudflare-workers': minor
'@sveltejs/adapter-cloudflare': minor
'@sveltejs/adapter-netlify': minor
'@sveltejs/adapter-vercel': minor
---

chore: upgrade esbuild
5 changes: 5 additions & 0 deletions .changeset/silent-games-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: disallow external navigation with `goto`
5 changes: 5 additions & 0 deletions .changeset/silent-mayflies-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: upgrade to TypeScript 5. Default `moduleResolution` to `bundler` in user projects to be permissive in consuming and `NodeNext` when running `package` to be strict in distributing
5 changes: 5 additions & 0 deletions .changeset/smart-buttons-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': minor
---

feat: provide SvelteKit html typings
5 changes: 5 additions & 0 deletions .changeset/smart-crabs-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': minor
---

feat: redact internal stack trace when reporting config errors
5 changes: 5 additions & 0 deletions .changeset/strange-eyes-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sveltejs/kit": minor
---

feat: allow for fine grained invalidation of search params
5 changes: 5 additions & 0 deletions .changeset/swift-clocks-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

fix: Adjust fail method and ActionFailure type
5 changes: 5 additions & 0 deletions .changeset/tall-suns-protect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: undefined is no longer a valid value for paths.relative
6 changes: 6 additions & 0 deletions .changeset/thick-suits-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@sveltejs/kit': major
'create-svelte': major
---

breaking: require Node 18.13 or newer
5 changes: 5 additions & 0 deletions .changeset/twelve-paws-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: fix path resolution
5 changes: 5 additions & 0 deletions .changeset/twenty-birds-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: remove `dangerZone.trackServerFetches`
5 changes: 5 additions & 0 deletions .changeset/twenty-ducks-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

chore(deps): upgrade cookies dependency
5 changes: 5 additions & 0 deletions .changeset/unlucky-crabs-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/enhanced-img': patch
---

chore: upgrade vite-imagetools
21 changes: 9 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
- uses: pnpm/action-setup@v2.4.0
- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '18.x'
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run lint
- run: cd packages/kit && pnpm prepublishOnly && { [ "`git status --porcelain=v1`" == "" ] || (echo "Generated types have changed — please run prepublishOnly locally and commit the changes after you have reviewed them" && exit 1); }
- run: cd packages/kit && pnpm prepublishOnly && { [ "`git status --porcelain=v1`" == "" ] || (echo "Generated types have changed — please run prepublishOnly locally and commit the changes after you have reviewed them"; git diff; exit 1); }
- run: pnpm run check
Tests:
runs-on: ${{ matrix.os }}
Expand All @@ -39,9 +39,6 @@ jobs:
fail-fast: false
matrix:
include:
- node-version: 16
os: ubuntu-latest
e2e-browser: 'chromium'
- node-version: 18
os: ubuntu-latest
e2e-browser: 'chromium'
Expand Down Expand Up @@ -79,27 +76,27 @@ jobs:
fail-fast: false
matrix:
include:
- node-version: 16
- node-version: 18
os: windows-2019 # slowness reported on newer versions https://github.com/actions/runner-images/issues/5166
e2e-browser: 'chromium'
mode: 'dev'
- node-version: 16
- node-version: 18
os: ubuntu-latest
e2e-browser: 'firefox'
mode: 'dev'
- node-version: 16
- node-version: 18
os: macOS-latest
e2e-browser: 'webkit'
mode: 'dev'
- node-version: 16
- node-version: 18
os: windows-2019 # slowness reported on newer versions https://github.com/actions/runner-images/issues/5166
e2e-browser: 'chromium'
mode: 'build'
- node-version: 16
- node-version: 18
os: ubuntu-latest
e2e-browser: 'firefox'
mode: 'build'
- node-version: 16
- node-version: 18
os: macOS-latest
e2e-browser: 'webkit'
mode: 'build'
Expand Down Expand Up @@ -134,7 +131,7 @@ jobs:
- uses: pnpm/action-setup@v2.4.0
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: cd packages/kit && pnpm prepublishOnly
Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/10-getting-started/10-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ In short, Svelte is a way of writing user interface components — like a naviga

Svelte renders UI components. You can compose these components and render an entire page with just Svelte, but you need more than just Svelte to write an entire app.

SvelteKit helps you build web apps while following modern best practices and providing solutions to common development challenges. It offers everything from basic functionalities — like a [router](glossary#routing) that updates your UI when a link is clicked — to more advanced capabilities. Its extensive list of features includes [build optimizations](https://vitejs.dev/guide/features.html#build-optimizations) to load only the minimal required code; [offline support](service-workers); [preloading](link-options#data-sveltekit-preload-data) pages before user navigation; [configurable rendering](page-options) to handle different parts of your app on the server via [SSR](glossary#ssr), in the browser through [client-side rendering](glossary#csr), or at build-time with [prerendering](glossary#prerendering); and much more. Building an app with all the modern best practices is fiendishly complicated, but SvelteKit does all the boring stuff for you so that you can get on with the creative part.
SvelteKit helps you build web apps while following modern best practices and providing solutions to common development challenges. It offers everything from basic functionalities — like a [router](glossary#routing) that updates your UI when a link is clicked — to more advanced capabilities. Its extensive list of features includes [build optimizations](https://vitejs.dev/guide/features.html#build-optimizations) to load only the minimal required code; [offline support](service-workers); [preloading](link-options#data-sveltekit-preload-data) pages before user navigation; [configurable rendering](page-options) to handle different parts of your app on the server via [SSR](glossary#ssr), in the browser through [client-side rendering](glossary#csr), or at build-time with [prerendering](glossary#prerendering); [image optimization](images); and much more. Building an app with all the modern best practices is fiendishly complicated, but SvelteKit does all the boring stuff for you so that you can get on with the creative part.

It reflects changes to your code in the browser instantly to provide a lightning-fast and feature-rich development experience by leveraging [Vite](https://vitejs.dev/) with a [Svelte plugin](https://github.com/sveltejs/vite-plugin-svelte) to do [Hot Module Replacement (HMR)](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#hot).
Loading

0 comments on commit c8a637d

Please sign in to comment.