Skip to content

Commit 8601827

Browse files
committed
Merge branch 'main' into fix-cloudflare-pages-detection
2 parents 8166582 + d4c0a81 commit 8601827

File tree

79 files changed

+344
-353
lines changed

Some content is hidden

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

79 files changed

+344
-353
lines changed

.changeset/moody-baboons-drum.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Issues with the [**soon**](https://github.com/sveltejs/kit/issues?q=is%3Aissue+i
6969

7070
## Testing
7171

72-
Run `pnpm test` to run the tests from all subpackages. Browser tests live in subdirectories of `packages/kit/test` such as `packages/kit/test/apps/basics`.
72+
Run `pnpm test:kit` to run the tests from the `packages/kit` directory. You can also run `pnpm test:others` to run tests from all packages __except__ the `packages/kit` directory. Browser tests live in subdirectories of `packages/kit/test` such as `packages/kit/test/apps/basics`.
7373

7474
You can run the tests for only a single package by first moving to that directory. E.g. `cd packages/kit`.
7575

documentation/docs/10-getting-started/30-project-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Project structure
44

55
A typical SvelteKit project looks like this:
66

7-
```bash
7+
```tree
88
my-project/
99
├ src/
1010
│ ├ lib/

documentation/docs/25-build-and-deploy/40-adapter-node.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,21 @@ node +++--env-file=.env+++ build
6464

6565
By default, the server will accept connections on `0.0.0.0` using port 3000. These can be customised with the `PORT` and `HOST` environment variables:
6666

67-
```
67+
```bash
6868
HOST=127.0.0.1 PORT=4000 node build
6969
```
7070

7171
Alternatively, the server can be configured to accept connections on a specified socket path. When this is done using the `SOCKET_PATH` environment variable, the `HOST` and `PORT` environment variables will be disregarded.
7272

73-
```
73+
```bash
7474
SOCKET_PATH=/tmp/socket node build
7575
```
7676

7777
### `ORIGIN`, `PROTOCOL_HEADER`, `HOST_HEADER`, and `PORT_HEADER`
7878

7979
HTTP doesn't give SvelteKit a reliable way to know the URL that is currently being requested. The simplest way to tell SvelteKit where the app is being served is to set the `ORIGIN` environment variable:
8080

81-
```
81+
```bash
8282
ORIGIN=https://my.site node build
8383

8484
# or e.g. for local previewing and testing
@@ -87,7 +87,7 @@ ORIGIN=http://localhost:3000 node build
8787

8888
With this, a request for the `/stuff` pathname will correctly resolve to `https://my.site/stuff`. Alternatively, you can specify headers that tell SvelteKit about the request protocol and host, from which it can construct the origin URL:
8989

90-
```
90+
```bash
9191
PROTOCOL_HEADER=x-forwarded-proto HOST_HEADER=x-forwarded-host node build
9292
```
9393

@@ -103,7 +103,7 @@ If `adapter-node` can't correctly determine the URL of your deployment, you may
103103

104104
The [`RequestEvent`](@sveltejs-kit#RequestEvent) object passed to hooks and endpoints includes an `event.getClientAddress()` function that returns the client's IP address. By default this is the connecting `remoteAddress`. If your server is behind one or more proxies (such as a load balancer), this value will contain the innermost proxy's IP address rather than the client's, so we need to specify an `ADDRESS_HEADER` to read the address from:
105105

106-
```
106+
```bash
107107
ADDRESS_HEADER=True-Client-IP node build
108108
```
109109

@@ -174,7 +174,7 @@ If you need to change the name of the environment variables used to configure th
174174
envPrefix: 'MY_CUSTOM_';
175175
```
176176

177-
```sh
177+
```bash
178178
MY_CUSTOM_HOST=127.0.0.1 \
179179
MY_CUSTOM_PORT=4000 \
180180
MY_CUSTOM_ORIGIN=https://my.site \

documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ https://dash.cloudflare.com/<your-account-id>/home
6464
6565
You will need to install [Wrangler](https://developers.cloudflare.com/workers/wrangler/install-and-update/) and log in, if you haven't already:
6666

67-
```sh
67+
```bash
6868
npm i -D wrangler
6969
wrangler login
7070
```
7171

7272
Then, you can build your app and deploy it:
7373

74-
```sh
74+
```bash
7575
wrangler deploy
7676
```
7777

documentation/docs/25-build-and-deploy/90-adapter-vercel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Set this string as an environment variable on Vercel by logging in and going to
131131

132132
To get this key known about for local development, you can use the [Vercel CLI](https://vercel.com/docs/cli/env) by running the `vercel env pull` command locally like so:
133133

134-
```sh
134+
```bash
135135
vercel env pull .env.development.local
136136
```
137137

documentation/docs/30-advanced/70-packaging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ You can create so-called declaration maps (`d.ts.map` files) by setting `"declar
249249

250250
To publish the generated package:
251251

252-
```sh
252+
```bash
253253
npm publish
254254
```
255255

documentation/docs/60-appendix/10-faq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,14 @@ Currently ESM Support within the latest Yarn (version 3) is considered [experime
195195

196196
The below seems to work although your results may vary. First create a new application:
197197

198-
```sh
198+
```bash
199199
yarn create svelte myapp
200200
cd myapp
201201
```
202202

203203
And enable Yarn Berry:
204204

205-
```sh
205+
```bash
206206
yarn set version berry
207207
yarn install
208208
```

eslint.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ export default [
4141
'packages/kit/test/build-errors/**/*',
4242
'packages/kit/test/prerendering/**/*',
4343
'packages/package/test/errors/**/*',
44-
'packages/package/test/fixtures/**/*'
44+
'packages/package/test/fixtures/**/*',
45+
'packages/test-redirect-importer/index.js'
4546
]
4647
}
4748
];

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"prettier-plugin-svelte": "^3.4.0",
3232
"typescript-eslint": "^8.35.0"
3333
},
34-
"packageManager": "pnpm@10.12.4",
34+
"packageManager": "pnpm@10.13.1",
3535
"engines": {
3636
"pnpm": ">=9.0.0"
3737
},

0 commit comments

Comments
 (0)