Skip to content

Commit

Permalink
Merge branch 'master' into server-fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed May 30, 2021
2 parents d729b08 + babe515 commit b2d0c8d
Show file tree
Hide file tree
Showing 133 changed files with 1,218 additions and 345 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-garlics-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-netlify': patch
---

Allow custom redirects for Netlify Adapter
6 changes: 6 additions & 0 deletions .changeset/bright-sheep-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@sveltejs/adapter-cloudflare-workers': patch
'@sveltejs/adapter-netlify': patch
---

change toml parser to support dotted keys and other language features added after the TOML v0.4.0 spec
5 changes: 5 additions & 0 deletions .changeset/chilled-zebras-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Update compatible Node versions
5 changes: 5 additions & 0 deletions .changeset/cool-hounds-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-netlify': patch
---

Prevent adapter from splitting query params if they contain commas
5 changes: 5 additions & 0 deletions .changeset/five-shirts-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

let hash only changes be handled by router
5 changes: 5 additions & 0 deletions .changeset/four-pillows-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Add svelte-kit package command
5 changes: 5 additions & 0 deletions .changeset/hot-kings-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-svelte': patch
---

Add favicon to skeleton template
5 changes: 5 additions & 0 deletions .changeset/khaki-lions-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-svelte': patch
---

Replace favicon
5 changes: 5 additions & 0 deletions .changeset/little-shirts-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-begin': patch
---

Prevent adapter from splitting query params if they contain commas
1 change: 0 additions & 1 deletion .changeset/mean-bananas-live.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
'hn.svelte.dev': patch
'@sveltejs/adapter-begin': patch
'@sveltejs/adapter-cloudflare-workers': patch
'@sveltejs/adapter-netlify': patch
Expand Down
5 changes: 5 additions & 0 deletions .changeset/mighty-carrots-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Allow passing HTTPS key pair in Vite section of config
7 changes: 7 additions & 0 deletions .changeset/odd-ligers-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@sveltejs/adapter-node': patch
'@sveltejs/adapter-vercel': patch
'@sveltejs/kit': patch
---

ensure `content-length` limit respected; handle `getRawBody` error(s)
21 changes: 21 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"beige-bananas-press",
"beige-grapes-love",
"beige-teachers-end",
"big-garlics-complain",
"blue-apes-type",
"blue-cats-mate",
"blue-poets-jam",
Expand All @@ -36,6 +37,7 @@
"brave-turkeys-bathe",
"breezy-sheep-dress",
"bright-cherries-hug",
"bright-sheep-promise",
"brown-bugs-arrive",
"brown-days-agree",
"brown-peas-worry",
Expand All @@ -48,6 +50,7 @@
"chatty-steaks-yell",
"chilled-books-dress",
"chilled-starfishes-jog",
"chilled-zebras-check",
"chilly-files-greet",
"chilly-flowers-design",
"clever-dolls-poke",
Expand All @@ -58,6 +61,7 @@
"cold-llamas-brake",
"cold-panthers-learn",
"cold-pants-unite",
"cool-hounds-divide",
"cool-spoons-dress",
"curvy-sloths-brake",
"cyan-roses-act",
Expand All @@ -76,6 +80,7 @@
"few-rockets-think",
"few-singers-pump",
"fifty-turtles-joke",
"five-shirts-allow",
"flat-cameras-build",
"flat-ducks-impress",
"flat-parrots-juggle",
Expand All @@ -84,6 +89,7 @@
"fluffy-dryers-jump",
"forty-months-prove",
"four-cheetahs-yawn",
"four-pillows-give",
"friendly-rivers-argue",
"funny-needles-talk",
"fuzzy-cougars-compare",
Expand All @@ -108,11 +114,13 @@
"heavy-lamps-explode",
"heavy-papayas-smile",
"hot-keys-walk",
"hot-kings-confess",
"hungry-lemons-scream",
"itchy-beers-burn",
"itchy-birds-admire",
"itchy-lobsters-tie",
"khaki-ears-repeat",
"khaki-lions-sell",
"khaki-socks-tan",
"khaki-wolves-shout",
"kind-steaks-bake",
Expand All @@ -131,13 +139,16 @@
"light-kangaroos-tie",
"light-keys-mix",
"light-roses-teach",
"little-shirts-happen",
"long-bulldogs-invent",
"long-moles-fold",
"loud-seals-remember",
"lovely-apricots-fail",
"lucky-bottles-kick",
"mean-bananas-live",
"metal-nails-divide",
"metal-tigers-kiss",
"mighty-carrots-switch",
"mighty-garlics-pretend",
"mighty-pumpkins-stare",
"modern-boats-lie",
Expand All @@ -161,6 +172,7 @@
"nine-starfishes-destroy",
"nine-tomatoes-poke",
"ninety-singers-invite",
"odd-ligers-swim",
"old-files-jump",
"olive-frogs-drive",
"orange-boats-love",
Expand Down Expand Up @@ -194,13 +206,15 @@
"rare-ways-watch",
"real-bikes-matter",
"real-cherries-exercise",
"rich-clocks-chew",
"rotten-cats-pump",
"rotten-singers-taste",
"rude-olives-wink",
"rude-tomatoes-thank",
"selfish-avocados-develop",
"selfish-owls-own",
"serious-books-push",
"seven-bags-sniff",
"seven-impalas-march",
"seven-jars-argue",
"shaggy-elephants-sell",
Expand All @@ -217,13 +231,15 @@
"six-geese-study",
"six-rules-collect",
"sixty-terms-decide",
"slow-buses-beam",
"slow-fans-own",
"small-pigs-doubt",
"smart-bears-leave",
"smart-mugs-chew",
"smart-pears-accept",
"smooth-dryers-heal",
"smooth-items-exercise",
"smooth-items-march",
"smooth-rockets-sneeze",
"smooth-shoes-mix",
"smooth-shrimps-fly",
Expand All @@ -249,6 +265,7 @@
"tasty-donkeys-wait",
"ten-mice-kneel",
"ten-plants-sleep",
"tender-buckets-turn",
"thick-meals-attend",
"thin-avocados-visit",
"thin-coins-move",
Expand Down Expand Up @@ -276,7 +293,9 @@
"tricky-buses-punch",
"tricky-walls-approve",
"tricky-wolves-confess",
"twelve-feet-deny",
"twelve-goats-knock",
"twelve-onions-burn",
"two-crabs-tease",
"two-students-melt",
"two-ties-begin",
Expand All @@ -289,6 +308,7 @@
"warm-cameras-fix",
"warm-cheetahs-wash",
"warm-jars-move",
"weak-parents-guess",
"weak-swans-lie",
"wet-bees-exist",
"wet-dingos-perform",
Expand All @@ -298,6 +318,7 @@
"wicked-spies-invite",
"wild-beans-happen",
"wild-cooks-drive",
"wise-bees-juggle",
"wise-bugs-run",
"witty-eyes-relax",
"witty-ligers-listen",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/pretty-cycles-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Allow non-lowercase 'content-type' header in ssr fetch requests
8 changes: 8 additions & 0 deletions .changeset/rich-clocks-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@sveltejs/adapter-begin': patch
'@sveltejs/adapter-node': patch
'@sveltejs/adapter-static': patch
'@sveltejs/kit': patch
---

bump `polka` and `sirv` dependency versions
5 changes: 5 additions & 0 deletions .changeset/seven-bags-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-svelte': patch
---

Add svelte-check to TS templates
5 changes: 5 additions & 0 deletions .changeset/slow-buses-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Upgrade to Vite 2.3.4
11 changes: 11 additions & 0 deletions .changeset/smooth-items-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@sveltejs/adapter-begin': patch
'@sveltejs/adapter-cloudflare-workers': patch
'@sveltejs/adapter-netlify': patch
'@sveltejs/adapter-node': patch
'@sveltejs/adapter-static': patch
'@sveltejs/adapter-vercel': patch
'@sveltejs/kit': patch
---

Pass validated svelte config to adapter adapt function
5 changes: 5 additions & 0 deletions .changeset/tender-buckets-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Rename handle's render parameter to resolve
5 changes: 5 additions & 0 deletions .changeset/twelve-feet-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-svelte': patch
---

gitignore package directory
10 changes: 10 additions & 0 deletions .changeset/twelve-onions-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@sveltejs/adapter-begin': patch
'@sveltejs/adapter-cloudflare-workers': patch
'@sveltejs/adapter-netlify': patch
'@sveltejs/adapter-node': patch
'@sveltejs/adapter-static': patch
'@sveltejs/adapter-vercel': patch
---

Make kit a peerDependency of the adapters
5 changes: 5 additions & 0 deletions .changeset/weak-parents-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-svelte': patch
---

Adjust build-template script to include package.json
5 changes: 5 additions & 0 deletions .changeset/wise-bees-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Ignore URLs that the app does not own
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/questions-and-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ assignees: ''

This issue tracker is intended to collect bug reports and feature requests.

For help with installation, information on how features work, or questions about specific features of SvelteKit, please come and join us in the [Svelte Discord](https://svelte.dev/chat), or ask your question on [Stack Overflow](https://stackoverflow.com/questions/tagged/svelte). Any issues open for help requests will be closed to keep from clogging up the issue tracker.
For help with installation, information on how features work, or questions about specific features of SvelteKit, please come and join us in the [Svelte Discord](https://svelte.dev/chat), or ask your question on [Stack Overflow](https://stackoverflow.com/questions/tagged/sveltekit). Any issues open for help requests will be closed to keep from clogging up the issue tracker.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- [ ] Ideally, include a test that fails without this PR but passes with it.

### Tests
- [ ] Run the tests with `pnpm test` and lint the project with `pnpm lint`
- [ ] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check`

### Changesets
- [ ] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpx changeset` and following the prompts
26 changes: 14 additions & 12 deletions documentation/docs/01-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,29 @@ A file or directory can have multiple dynamic parts, like `[id]-[category].svelt
Endpoints are modules written in `.js` (or `.ts`) files that export functions corresponding to HTTP methods. For example, our hypothetical blog page, `/blog/cool-article`, might request data from `/blog/cool-article.json`, which could be represented by a `src/routes/blog/[slug].json.js` endpoint:

```ts
type Request<Context = any> = {
type Headers = Record<string, string>;

type Request<Locals = Record<string, any>, Body = unknown> = {
method: string;
host: string;
method: 'GET';
headers: Record<string, string>;
headers: Headers;
path: string;
params: Record<string, string | string[]>;
params: Record<string, string>;
query: URLSearchParams;
rawBody: string | Uint8Array;
body: string | Uint8Array | JSONValue;
locals: Record<string, any>; // see below
body: ParameterizedBody<Body>;
locals: Locals; // populated by hooks handle
};

type Response = {
type EndpointOutput = {
status?: number;
headers?: Record<string, string>;
body?: any;
headers?: Headers;
body?: string | Uint8Array | JSONValue;
};

type RequestHandler<Context = any> = {
(request: Request<Context>) => Response | Promise<Response>;
}
type RequestHandler<Locals = Record<string, any>> = (
request: Request<Locals>
) => void | EndpointOutput | Promise<EndpointOutput>;
```

```js
Expand Down
4 changes: 2 additions & 2 deletions documentation/docs/03-loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type LoadInput = {
page: {
host: string;
path: string;
params: Record<string, string | string[]>;
params: Record<string, string>;
query: URLSearchParams;
};
fetch: (info: RequestInfo, init?: RequestInit) => Promise<Response>;
Expand All @@ -21,7 +21,7 @@ type LoadInput = {

type LoadOutput = {
status?: number;
error?: Error;
error?: string | Error;
redirect?: string;
props?: Record<string, any>;
context?: Record<string, any>;
Expand Down
Loading

0 comments on commit b2d0c8d

Please sign in to comment.