Skip to content

Commit aa3aa95

Browse files
authored
Merge branch 'main' into fix/tutorial-02-01-05-consistency
2 parents 7142962 + b388cc6 commit aa3aa95

File tree

154 files changed

+3577
-32
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+3577
-32
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Sync packages
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0' # At 00:00 on Sunday.
6+
workflow_dispatch: # Allow manual triggering
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
update:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
- uses: pnpm/action-setup@v4
20+
- uses: actions/setup-node@v5
21+
with:
22+
node-version: 24
23+
- run: pnpm install --frozen-lockfile --ignore-scripts
24+
25+
- name: Sync packages
26+
run: cd apps/svelte.dev && pnpm sync-packages
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Create or update pull request
31+
uses: peter-evans/create-pull-request@599a7e63a6240886b1b61fe984db1de9e0b05bc4 # v7.0.8
32+
with:
33+
commit-message: 'chore(packages): Update metadata'
34+
title: 'chore(packages): Update metadata'
35+
body: Automatically fetch latest packages metadata from NPM & GitHub.
36+
branch: ci/update-packages-metadata
37+
delete-branch: true

apps/svelte.dev/content/docs/kit/10-getting-started/25-project-types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ If you are using an external backend, you can simply skip over and ignore the pa
3333

3434
## Serverless app
3535

36-
SvelteKit apps are simple to run on serverless platforms. [The default zero config adapter](adapter-auto) will automatically run your app on a number of supported platforms or you can use [`adapter-vercel`](adapter-vercel), [`adapter-netlify`](adapter-netlify), or [`adapter-cloudflare`](adapter-cloudflare) to provide platform-specific configuration. And [community adapters](https://sveltesociety.dev/packages?category=sveltekit-adapters) allow you to deploy your application to almost any serverless environment. Some of these adapters such as [`adapter-vercel`](adapter-vercel) and [`adapter-netlify`](adapter-netlify) offer an `edge` option, to support [edge rendering](glossary#Edge) for improved latency.
36+
SvelteKit apps are simple to run on serverless platforms. [The default zero config adapter](adapter-auto) will automatically run your app on a number of supported platforms or you can use [`adapter-vercel`](adapter-vercel), [`adapter-netlify`](adapter-netlify), or [`adapter-cloudflare`](adapter-cloudflare) to provide platform-specific configuration. And [community adapters](/packages#sveltekit-adapters) allow you to deploy your application to almost any serverless environment. Some of these adapters such as [`adapter-vercel`](adapter-vercel) and [`adapter-netlify`](adapter-netlify) offer an `edge` option, to support [edge rendering](glossary#Edge) for improved latency.
3737

3838
## Your own server
3939

@@ -63,7 +63,7 @@ You can turn a [SvelteKit SPA](single-page-apps) into a desktop app with [Tauri]
6363

6464
## Browser extension
6565

66-
You can build browser extensions using either [`adapter-static`](adapter-static) or [community adapters](https://sveltesociety.dev/packages?category=sveltekit-adapters) specifically tailored towards browser extensions.
66+
You can build browser extensions using either [`adapter-static`](adapter-static) or [community adapters](/packages#sveltekit-adapters) specifically tailored towards browser extensions.
6767

6868
## Embedded device
6969

apps/svelte.dev/content/docs/kit/20-core-concepts/60-remote-functions.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -976,8 +976,6 @@ export const getStuff = query('unchecked', async ({ id }: { id: string }) => {
976976
});
977977
```
978978
979-
> [!NOTE] `form` does not accept a schema since you are always passed a `FormData` object. You are free to parse and validate this as you see fit.
980-
981979
## Using `getRequestEvent`
982980
983981
Inside `query`, `form` and `command` you can use [`getRequestEvent`]($app-server#getRequestEvent) to get the current [`RequestEvent`](@sveltejs-kit#RequestEvent) object. This makes it easy to build abstractions for interacting with cookies, for example:

apps/svelte.dev/content/docs/kit/25-build-and-deploy/20-adapters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Official adapters exist for a variety of platforms — these are documented on t
1313
- [`@sveltejs/adapter-static`](adapter-static) for static site generation (SSG)
1414
- [`@sveltejs/adapter-vercel`](adapter-vercel) for Vercel
1515

16-
Additional [community-provided adapters](https://sveltesociety.dev/packages?category=sveltekit-adapters) exist for other platforms.
16+
Additional [community-provided adapters](/packages#sveltekit-adapters) exist for other platforms.
1717

1818
## Using adapters
1919

apps/svelte.dev/content/docs/kit/40-best-practices/06-icons.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ A great way to use icons is to define them purely via CSS. Iconify offers suppor
99

1010
## Svelte
1111

12-
There are many [icon libraries for Svelte](https://www.sveltesociety.dev/packages?category=icons). When choosing an icon library, it is recommended to avoid those that provide a `.svelte` file per icon as these libraries can have thousands of `.svelte` files which really slow down [Vite's dependency optimization](https://vite.dev/guide/dep-pre-bundling.html). This can become especially pathological if the icons are imported both via an umbrella import and subpath import [as described in the `vite-plugin-svelte` FAQ](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#what-is-going-on-with-vite-and-pre-bundling-dependencies).
12+
There are many [icon libraries for Svelte](/packages#icons). When choosing an icon library, it is recommended to avoid those that provide a `.svelte` file per icon as these libraries can have thousands of `.svelte` files which really slow down [Vite's dependency optimization](https://vite.dev/guide/dep-pre-bundling.html). This can become especially pathological if the icons are imported both via an umbrella import and subpath import [as described in the `vite-plugin-svelte` FAQ](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#what-is-going-on-with-vite-and-pre-bundling-dependencies).

apps/svelte.dev/content/docs/kit/60-appendix/20-integrations.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default config;
2121

2222
You will also need to use a preprocessor if you're using TypeScript with Svelte 4. TypeScript is supported natively in Svelte 5 if you're using only the type syntax. To use more complex TypeScript syntax in Svelte 5, you will need still need a preprocessor and can use `vitePreprocess({ script: true })`.
2323

24-
## Adders
24+
## Add-ons
2525

2626
Run [`npx sv add`](/docs/cli/sv-add) to setup many different complex integrations with a single command including:
2727
- prettier (formatting)
@@ -35,9 +35,9 @@ Run [`npx sv add`](/docs/cli/sv-add) to setup many different complex integration
3535
- mdsvex (markdown)
3636
- storybook (frontend workshop)
3737

38-
## Directory
38+
## Packages
3939

40-
See [sveltesociety.dev](https://sveltesociety.dev/) for a full listing of [packages](https://sveltesociety.dev/packages) and [templates](https://sveltesociety.dev/templates) available for use with Svelte and SvelteKit.
40+
Check out [the packages page](/packages) for a curated set of high quality Svelte packages. You can also see [sveltesociety.dev](https://sveltesociety.dev/) for additional libraries, templates, and resources.
4141

4242
## Additional integrations
4343

apps/svelte.dev/content/docs/svelte/01-introduction/02-getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ Don't worry if you don't know Svelte yet! You can ignore all the nice features S
1616

1717
## Alternatives to SvelteKit
1818

19-
You can also use Svelte directly with Vite by running `npm create vite@latest` and selecting the `svelte` option. With this, `npm run build` will generate HTML, JS, and CSS files inside the `dist` directory using [vite-plugin-svelte](https://github.com/sveltejs/vite-plugin-svelte). In most cases, you will probably need to [choose a routing library](faq#Is-there-a-router) as well.
19+
You can also use Svelte directly with Vite by running `npm create vite@latest` and selecting the `svelte` option. With this, `npm run build` will generate HTML, JS, and CSS files inside the `dist` directory using [vite-plugin-svelte](https://github.com/sveltejs/vite-plugin-svelte). In most cases, you will probably need to [choose a routing library](/packages#routing) as well.
2020

2121
>[!NOTE] Vite is often used in standalone mode to build [single page apps (SPAs)](../kit/glossary#SPA), which you can also [build with SvelteKit](../kit/single-page-apps).
2222
23-
There are also plugins for [Rollup](https://github.com/sveltejs/rollup-plugin-svelte), [Webpack](https://github.com/sveltejs/svelte-loader) [and a few others](https://sveltesociety.dev/packages?category=build-plugins), but we recommend Vite.
23+
There are also [plugins for other bundlers](/packages#bundler-plugins), but we recommend Vite.
2424

2525
## Editor tooling
2626

apps/svelte.dev/content/docs/svelte/07-misc/99-faq.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ There will be a blog post about this eventually, but in the meantime, check out
6666

6767
## Is there a UI component library?
6868

69-
There are several UI component libraries as well as standalone components. Find them under the [design systems section of the components page](https://sveltesociety.dev/packages?category=design-system) on the Svelte Society website.
69+
There are several [UI component libraries](/packages#component-libraries) as well as standalone components listed on [the packages page](/packages).
7070

7171
## How do I test Svelte apps?
7272

@@ -92,17 +92,9 @@ Some resources for getting started with testing:
9292

9393
## Is there a router?
9494

95-
The official routing library is [SvelteKit](/docs/kit). SvelteKit provides a filesystem router, server-side rendering (SSR), and hot module reloading (HMR) in one easy-to-use package. It shares similarities with Next.js for React.
95+
The official routing library is [SvelteKit](/docs/kit). SvelteKit provides a filesystem router, server-side rendering (SSR), and hot module reloading (HMR) in one easy-to-use package. It shares similarities with Next.js for React and Nuxt.js for Vue.
9696

97-
However, you can use any router library. A lot of people use [page.js](https://github.com/visionmedia/page.js). There's also [navaid](https://github.com/lukeed/navaid), which is very similar. And [universal-router](https://github.com/kriasoft/universal-router), which is isomorphic with child routes, but without built-in history support.
98-
99-
If you prefer a declarative HTML approach, there's the isomorphic [svelte-routing](https://github.com/EmilTholin/svelte-routing) library and a fork of it called [svelte-navigator](https://github.com/mefechoel/svelte-navigator) containing some additional functionality.
100-
101-
If you need hash-based routing on the client side, check out the [hash option](https://svelte.dev/docs/kit/configuration#router) in SvelteKit, [svelte-spa-router](https://github.com/ItalyPaleAle/svelte-spa-router), or [abstract-state-router](https://github.com/TehShrike/abstract-state-router/).
102-
103-
[Routify](https://routify.dev) is another filesystem-based router, similar to SvelteKit's router. Version 3 supports Svelte's native SSR.
104-
105-
You can see a [community-maintained list of routers on sveltesociety.dev](https://sveltesociety.dev/packages?category=routers).
97+
However, you can use any router library. A sampling of available routers are highlighted [on the packages page](/packages#routing).
10698

10799
## How do I write a mobile app with Svelte?
108100

apps/svelte.dev/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"check": "node scripts/update.js && svelte-kit sync && svelte-check",
1414
"format": "prettier --write .",
1515
"lint": "prettier --check .",
16-
"sync-docs": "tsx scripts/sync-docs/index.ts"
16+
"sync-docs": "tsx scripts/sync-docs/index.ts",
17+
"sync-packages": "node scripts/sync-packages/index.ts"
1718
},
1819
"dependencies": {
1920
"@jridgewell/sourcemap-codec": "^1.4.15",
@@ -40,6 +41,7 @@
4041
"flexsearch": "^0.7.43",
4142
"flru": "^1.0.2",
4243
"icons": "workspace:*",
44+
"logos": "workspace:*",
4345
"port-authority": "^2.0.1",
4446
"topojson-client": "^3.1.0",
4547
"vitest": "^3.2.4",

apps/svelte.dev/scripts/sync-docs/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import path from 'node:path';
44
import fs from 'node:fs';
55
import { parseArgs } from 'node:util';
66
import ts from 'typescript';
7-
import glob from 'tiny-glob/sync';
7+
import glob from 'tiny-glob/sync.js';
88
import chokidar from 'chokidar';
99
import { fileURLToPath } from 'node:url';
10-
import { clone_repo, migrate_meta_json } from './utils';
11-
import { get_types, read_d_ts_file, read_types } from './types';
10+
import { clone_repo, migrate_meta_json } from './utils.ts';
11+
import { get_types, read_d_ts_file, read_types } from './types.ts';
1212
import type { Modules } from '@sveltejs/site-kit/markdown';
1313

1414
interface Package {

0 commit comments

Comments
 (0)