From 94b0939c695635f762104f9681e173d2edf72b04 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 29 Dec 2021 14:37:05 +0000 Subject: [PATCH 01/45] replace request.origin/path/query with request.url --- .../src/routes/[list]/[page].svelte | 3 +- .../hn.svelte.dev/src/routes/__layout.svelte | 13 +- .../hn.svelte.dev/src/routes/index.svelte | 5 +- .../hn.svelte.dev/src/routes/item/[id].svelte | 18 +- .../src/routes/user/[name].svelte | 11 +- .../default/src/lib/header/Header.svelte | 12 +- packages/kit/src/core/adapt/prerender.js | 10 +- packages/kit/src/core/build/build_server.js | 2 +- packages/kit/src/core/create_app/index.js | 11 +- packages/kit/src/core/dev/index.js | 6 +- packages/kit/src/core/preview/index.js | 5 +- packages/kit/src/runtime/app/stores.js | 22 ++- packages/kit/src/runtime/client/renderer.js | 159 ++++++++---------- packages/kit/src/runtime/client/router.js | 15 +- packages/kit/src/runtime/client/start.js | 3 +- packages/kit/src/runtime/client/types.d.ts | 12 +- packages/kit/src/runtime/server/endpoint.js | 2 +- packages/kit/src/runtime/server/index.js | 19 ++- packages/kit/src/runtime/server/page/index.js | 11 +- .../kit/src/runtime/server/page/load_node.js | 76 ++++----- .../kit/src/runtime/server/page/render.js | 26 ++- .../kit/src/runtime/server/page/respond.js | 5 +- .../runtime/server/page/respond_with_error.js | 17 +- .../apps/amp/src/routes/origin/index.json.js | 4 +- .../apps/amp/src/routes/origin/index.svelte | 8 +- .../routes/caching/private/uses-fetch.svelte | 4 +- .../basics/src/routes/encoded/[slug].svelte | 10 +- .../encoded/\350\213\227\346\235\241.svelte" | 8 +- .../basics/src/routes/keepfocus/index.svelte | 4 +- .../basics/src/routes/load/[dynamic].svelte | 4 +- .../load/change-detection/one/[x].svelte | 4 +- .../load/change-detection/two/[y].svelte | 4 +- .../src/routes/load/large-response.svelte | 4 +- .../routes/load/server-fetch-request.svelte | 6 +- .../src/routes/load/stuff/[x]/[y]/[z].svelte | 6 +- .../routes/load/stuff/[x]/[y]/__layout.svelte | 6 +- .../src/routes/load/stuff/[x]/__layout.svelte | 6 +- .../basics/src/routes/origin/index.svelte | 4 +- .../apps/basics/src/routes/query/echo.svelte | 8 +- .../basics/src/routes/routing/[slug].svelte | 4 +- .../fallthrough-advanced/[animal].svelte | 8 +- .../fallthrough-advanced/[mineral].svelte | 8 +- .../fallthrough-advanced/[vegetable].svelte | 8 +- .../routing/fallthrough-simple/[legal].svelte | 4 +- .../routes/routing/rest/[...rest]/deep.svelte | 8 +- .../routing/rest/[...rest]/index.svelte | 8 +- .../non-greedy/[dynamic]-bar/[...rest].svelte | 4 +- .../rest/non-greedy/foo/[...rest].svelte | 4 +- .../routing/rest/path/[...ignored].svelte | 6 +- .../routes/routing/skipped/[one]/[two].svelte | 4 +- .../routing/split-params/[a]-[b].svelte | 6 +- .../apps/basics/src/routes/store/index.svelte | 6 +- .../routes/store/navigating/__layout.svelte | 2 +- .../apps/basics/src/routes/xss/[path].svelte | 4 +- .../apps/basics/src/routes/xss/query.svelte | 9 +- .../pages/custom-extensions/[slug].svelte.md | 4 +- .../options/source/pages/origin/index.json.js | 4 +- .../options/source/pages/origin/index.svelte | 8 +- .../options/source/pages/slash/child.svelte | 4 +- .../options/source/pages/slash/index.svelte | 4 +- packages/kit/types/ambient-modules.d.ts | 18 +- packages/kit/types/app.d.ts | 3 +- packages/kit/types/hooks.d.ts | 12 +- packages/kit/types/index.d.ts | 2 +- packages/kit/types/page.d.ts | 10 +- 65 files changed, 349 insertions(+), 366 deletions(-) diff --git a/examples/hn.svelte.dev/src/routes/[list]/[page].svelte b/examples/hn.svelte.dev/src/routes/[list]/[page].svelte index ae13c0ad39eb..44b661e01ca6 100644 --- a/examples/hn.svelte.dev/src/routes/[list]/[page].svelte +++ b/examples/hn.svelte.dev/src/routes/[list]/[page].svelte @@ -1,7 +1,8 @@ -