Skip to content

[pull] main from sveltejs:main #1

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

Open
wants to merge 1,130 commits into
base: main
Choose a base branch
from
Open

[pull] main from sveltejs:main #1

wants to merge 1,130 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Dec 20, 2023

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

eltigerchino and others added 27 commits January 6, 2025 11:42
…ption is set from the server (#13262)

fixes #13255

trailingSlash is evaluated on the client by making a server call, so we need to prerender it
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…13286)

fixes #13280

Similar to #5907 we need to import the param matchers file ending with .js so that when the moduleResolution is set to something strict such as NodeNext (the default for libraries) the type inference isn't lost when it can't resolve the param matcher file due to the lack of a file extension.
* add docs

* format

* indentation
…de in server handle (#13153)

* Update 20-hooks.md

* Update documentation/docs/30-advanced/20-hooks.md

---------

Co-authored-by: Elliott Johnson <sejohnson@torchcloudconsulting.com>
…vigating to a non-existent page (#12005)

fixes #11099

We end up in that code path when encountering a 404 route, because we first try to fall back to the server, and load the root error page else, at which point the layout load is run.
fixes #12305
closes #12306

This is an alternative to #12306 . Instead of creating the emulator every time the Vite dev and preview middlewares are invoked, we await Cloudflare's platform proxy only when the adapter emulated platform is accessed, rather than much earlier when adapter.adapt is invoked.
Co-authored-by: Chew Tee Ming <chew.tee.ming@nindatech.com>
…with proxies (#12157)

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
When loading a non-SSR page and pressing the browser's back button while
the page is still loading, it's possible for `current.url` to still be
the default value of `null`, which then causes the `popState` function
to throw. We therefore guard against that.

Fixes #12924
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…13142)

* update adapter versions

* changeset

* add test

* update cf adapter version to 5
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…t package (#12532)

Simplifies code a bit around usage locations in our own code, and solves some issues people may have with their setups
closes #11578

---------

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: 오병진 <64676070+sunrabbit123@users.noreply.github.com>
)



---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
closes #13020

---------

Co-authored-by: Chew Tee Ming <chew.tee.ming@nindatech.com>
Closes #12726

---------

Co-authored-by: Tee Ming <chewteeming01@gmail.com>
Using class method function types causes SvelteKit users to get
TypeScript ESLint errors if they're using the
[@typescript-eslint/unbound-method][1] rule (included by default in the
`recommended-type-checked` config).

[1]: https://typescript-eslint.io/rules/unbound-method/

The following types in `public.d.ts` are still using non-arrow functions,
since

- These functions are for user inputs, which might rely on these
  functions being bound, and so it might be a breaking change to
  change these types:
  - [`Emulator['platform']`][1]
  - functions in `KitConfig`
- Class methods that rely on `this`:
  - [`Server`][2]

[1]: https://github.com/sveltejs/kit/blob/b25f2d052bbf22e832ac57cbf9e12c48ac922f96/packages/kit/src/exports/public.d.ts#L272-L276
[2]: https://github.com/sveltejs/kit/blob/b25f2d052bbf22e832ac57cbf9e12c48ac922f96/packages/kit/src/exports/public.d.ts#L1174-L1178

fixes #12622
fixes #13287

This PR fixes the client-side external link evaluation so that when using the hash router, accessing /index.html is considered an internal link. This prevents the page from reloading infinitely because the router incorrectly considered /index.html an external link.

There's also a slight doc change. Instead of suggesting all links start with /#/, suggesting links start with # allows the router to preserve the /index.html pathname. For example, links to /about should be #/about instead of /#/about so that it navigates to /index.html#/about.
…r` (#13197)

Related to the hard-to-debug error talked about in #10855
This PR ensures that this server-load data request is also patchable by basically using the same mechanism introduced in #10009
benmccann and others added 30 commits May 22, 2025 07:55
* make reference a bit clearer

* missed a spot
* fix: omit stack when logging 404 errors in dev

* Update .changeset/dull-pants-glow.md
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…13846)

* fix: build failure using adapter-cloudflare with paths.base (#13769)

* Update .changeset/dull-toys-work.md

---------

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
* chore: Update Windows CI version

* oops
* attempt to clarify use:enhance docs

* Update documentation/docs/20-core-concepts/30-form-actions.md

---------

Co-authored-by: Elliott Johnson <sejohnson@torchcloudconsulting.com>
fixes #13675

This PR adds an optional chain for when deserialize tries to access app.decoders since app is always undefined on the server and is only initialised on the client.
* fix: suppress console spam for chrome devtools requests

* add link to documentation

* Update packages/kit/src/runtime/server/respond.js

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>

* print link to vite plugin

---------

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
… dev (#13793)

* don't cache during dev

* changeset

* ok we can cache

* Update .changeset/big-eels-watch.md

* fix universal file check

* add correct test

* format

* cleanup

* fix

* ensure nodes are analysed sequentially

* correctly invalidate child nodes when universal node is updated

* windows path separators :))))

* we'll come back to this later

* lint
…nction when inlining CSS (#13723)

* add test

* map client to server stylesheets using rollup bundle data

* changeset

* avoid duplicate filenames

* skip bundle mapping if inline style threshold is not enabled

* optimise mapping and skip if no inline threshold
…ance (#13843)

* add failing test

* format

* thank you Dominik G!

* better comment

* changeset

* avoid specifying cjs test dep as a workspace
* use window.location to scroll to deep linked element

* changeset

* prettier

* fix

* fix scroll position being changed

* prettier

* found a fix that works!

* improve some old related tests

* forgot to restore scroll pos
…ing hash router (#13861)

This PR fixes a regression caused by #10856 which broke hash router navigation.

We can't apply the same fix for hash routing because location.replace doesn't work since the browser interprets the entire hash as the element it should focus but we're using it as a pathname replacement. element.focus() doesn't work on Safari and Ubuntu Firefox so that's moot too.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Fix link to server hooks locals
)

* feat: Respect abort signals during serverside fetch optimization

* move

* lint

* snake_case

* chore: Remove abort listener
…outing (#13884)

* changeset, fix, and tests

* Update packages/kit/src/runtime/client/client.js

Co-authored-by: Elliott Johnson <sejohnson@torchcloudconsulting.com>

* Update packages/kit/src/runtime/client/client.js

* format

* lint

* restore original logic

---------

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Elliott Johnson <sejohnson@torchcloudconsulting.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.