Skip to content

Commit 052d5cd

Browse files
committed
Merge remote-tracking branch 'upstream/master' into amp-purify-css
2 parents 930273d + 75d88d3 commit 052d5cd

File tree

684 files changed

+16859
-10846
lines changed

Some content is hidden

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

684 files changed

+16859
-10846
lines changed

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://unpkg.com/@changesets/config@1.5.0/schema.json",
2+
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
33
"changelog": ["@svitejs/changesets-changelog-github-compact", { "repo": "sveltejs/kit" }],
44
"commit": false,
55
"linked": [],

.changeset/exit-pre-manually.js

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

.changeset/mighty-crews-switch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/kit': patch
3+
---
4+
5+
fix: correctly restore trailing slash in url pathname for data requests

.changeset/pink-sloths-join.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/kit': patch
3+
---
4+
5+
fix: load trailing slash option from server even when there's no load function

.eslintrc.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
{
2+
"root": true,
3+
"extends": "@sveltejs",
24
"env": {
35
"es2022": true
46
},
5-
"parserOptions": {
6-
"ecmaVersion": "latest",
7-
"sourceType": "module"
8-
},
9-
"plugins": ["unicorn"],
10-
"root": true,
7+
"ignorePatterns": [
8+
"packages/create-svelte/shared/",
9+
"packages/kit/test/prerendering/*/build",
10+
"packages/adapter-static/test/apps/*/build",
11+
"packages/adapter-cloudflare/files",
12+
"packages/adapter-netlify/files",
13+
"packages/adapter-node/files"
14+
],
1115
"rules": {
12-
"unicorn/prefer-node-protocol": "error"
16+
"no-undef": "off"
1317
}
1418
}

.github/workflows/audit.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: audit
2+
3+
on:
4+
schedule:
5+
- cron: "0 5 * * *" # daily 5AM
6+
7+
env:
8+
# not needed for audit
9+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
10+
11+
permissions:
12+
contents: read # to fetch code (actions/checkout)
13+
14+
jobs:
15+
Audit:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: pnpm/[email protected]
20+
- uses: actions/setup-node@v3
21+
with:
22+
node-version: '20.x'
23+
cache: pnpm
24+
- run: pnpm install --frozen-lockfile
25+
# check prod dependencies as these would affect users
26+
- run: pnpm audit --prod

.github/workflows/ci.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- uses: actions/checkout@v3
26-
- uses: pnpm/action-setup@v2.2.4
26+
- uses: pnpm/action-setup@v2.4.0
2727
- uses: actions/setup-node@v3
2828
with:
2929
node-version: '16.x'
3030
cache: pnpm
3131
- run: pnpm install --frozen-lockfile
3232
- run: pnpm run lint
33+
- run: cd packages/kit && pnpm prepublishOnly
3334
- run: pnpm run check
3435
Tests:
3536
runs-on: ${{ matrix.os }}
@@ -44,12 +45,15 @@ jobs:
4445
- node-version: 18
4546
os: ubuntu-latest
4647
e2e-browser: 'chromium'
48+
- node-version: 20
49+
os: ubuntu-latest
50+
e2e-browser: 'chromium'
4751
env:
4852
KIT_E2E_BROWSER: ${{matrix.e2e-browser}}
4953
steps:
5054
- run: git config --global core.autocrlf false
5155
- uses: actions/checkout@v3
52-
- uses: pnpm/action-setup@v2.2.4
56+
- uses: pnpm/action-setup@v2.4.0
5357
- uses: actions/setup-node@v3
5458
with:
5559
node-version: ${{ matrix.node-version }}
@@ -104,7 +108,7 @@ jobs:
104108
steps:
105109
- run: git config --global core.autocrlf false
106110
- uses: actions/checkout@v3
107-
- uses: pnpm/action-setup@v2.2.4
111+
- uses: pnpm/action-setup@v2.4.0
108112
- uses: actions/setup-node@v3
109113
with:
110114
node-version: ${{ matrix.node-version }}
@@ -123,3 +127,15 @@ jobs:
123127
retention-days: 3
124128
name: test-failure-cross-platform-${{ matrix.mode }}-${{ github.run_id }}-${{ matrix.os }}-${{ matrix.node-version }}-${{ matrix.e2e-browser }}
125129
path: test-results-cross-platform-${{ matrix.mode }}.tar.gz
130+
Test-create-svelte:
131+
runs-on: ubuntu-latest
132+
steps:
133+
- uses: actions/checkout@v3
134+
- uses: pnpm/[email protected]
135+
- uses: actions/setup-node@v3
136+
with:
137+
node-version: 16
138+
cache: pnpm
139+
- run: pnpm install --frozen-lockfile
140+
- run: cd packages/kit && pnpm prepublishOnly
141+
- run: pnpm run test:create-svelte

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
2323
fetch-depth: 0
24-
- uses: pnpm/action-setup@v2.2.4
24+
- uses: pnpm/action-setup@v2.4.0
2525
- name: Setup Node.js
2626
uses: actions/setup-node@v3
2727
with:
@@ -35,7 +35,8 @@ jobs:
3535
uses: changesets/action@v1
3636
with:
3737
# This expects you to have a script called release which does a build for your packages and calls changeset publish
38-
publish: pnpm release
38+
publish: pnpm changeset:release
39+
version: pnpm changeset:version
3940
env:
4041
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4142
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ vite.config.js.timestamp-*
1818
.vercel
1919
.test-tmp
2020
symlink-from
21+
.idea/

CONTRIBUTING.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,20 @@ cd kit
1616
pnpm install
1717
```
1818

19-
You can now run SvelteKit by linking it into your project with [pnpm `overrides`](https://pnpm.io/package_json#pnpmoverrides) as demonstrated in the [sandbox example](https://github.com/sveltejs/kit-sandbox) or by running one of the test projects as described in [the testing section](#testing) below.
19+
You can now run SvelteKit by linking it into your project with [pnpm `overrides`](https://pnpm.io/package_json#pnpmoverrides):
20+
21+
```jsonc
22+
{
23+
// ...
24+
"pnpm": {
25+
"overrides": {
26+
"@sveltejs/kit": "link:../path/to/svelte-kit/packages/kit",
27+
// additionally/optional the adapter you're using
28+
"@sveltejs/adapter-auto": "link:../path/to/svelte-kit/packages/adapter-auto"
29+
}
30+
}
31+
}
32+
```
2033

2134
## Code structure
2235

@@ -44,7 +57,7 @@ Run `pnpm test` to run the tests from all subpackages. Browser tests live in sub
4457

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

47-
You must rebuild each time before running the tests if you've made code changes.
60+
For some packages you must rebuild each time before running the tests if you've made code changes. These packages have a `build` command. Packages like `packages/kit` don't require a build step.
4861

4962
To run a single integration test or otherwise control the running of the tests locally see [the Playwright CLI docs](https://playwright.dev/docs/test-cli). Note that you will need to run these commands from the test project directory such as `packages/kit/test/apps/basics`.
5063

0 commit comments

Comments
 (0)