-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace request.origin/path/query with request.url #3126
Conversation
|
I didn't have any great ideas of what to rename |
Still to do:
|
Co-authored-by: Ben McCann <[email protected]>
Co-authored-by: Ben McCann <[email protected]>
@Rich-Harris I know this is closed but am I correct in thinking the original statement of |
Yep, classic case of the comments not matching the code. Last-minute bikeshedding |
breaking change in requst.origin/path/query, see sveltejs/kit#3126 all places where page is used in a load function
- fix page url and params, see: sveltejs/kit#3126
See sveltejs/kit#3126 for more details
This is a substantial breaking change, but a welcome one — it simplifies things a bit. It replaces
request.origin
,request.path
andrequest.query
with a singlerequest.url
, which is a standardURL
object.Similarly, page
load
functions now take a{ url, params, ... }
object rather than{ page, ... }
, and thepage
store contains{ url, params }
.@Conduitry suggested we take this opportunity to rethink the naming of
params
, though I haven't had any particularly great ideas for what to rename it to.Closes #3078.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpx changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0