Commit Graph

1041 Commits

Author SHA1 Message Date
Tommy Yu
b13f1f6313 feat: provide tower services for serving static files (#4528)
* Remove unused example module.

* Helpers for setting up site pkg static routes

- This provides a function that construct an underlying `ServeDir`
  service and a function that constructs the typical path to serve the
  assets from.

* Provide the error handler as a service

- Combined with the previous static ServeDir service, these two can work
  together to provide the existing functionality, or be combined with
  other tower services to allow more control and flexibility as they may
  be composed with other services, while `file_and_error_handler` does
  not permit such a level of reuse.

* Need to test default feature manually.

- For whatever reason the default feature isn't automatically added by
  `cargo-all-features`.

* Integration tests for `leptos_axum`.

- Ensure the different ways to configure the services are tested to be
  sure they will keep serving asset files and the expected error pages.

* Test for #4394

- This is separated out mostly to show how a new test case might be
  added for an integration case viewable as a patch.

* Configure cargo-nextest to make new tests work

- Refer to comments added to relevant files for the issue this fixes.

* Remove hardcoding ports for axum test services

- Manuallying specifying ports will become annoying to keep track of for
  every different tests, instead require the server to report the port
  it started with and have parse that output into a helper type, which
  in turn provides a method to construct uri required for testing.

* Improve `cargo-nextest` setup for leptos_axum

- Define `cargo-nextest` setup-script for the leptos_axum integration
  tests so that `cargo leptos build` will run for the intended target,
  while also disable the running of that by the test itself if the
  environment variable associated with `cargo-nextest` is set.
- Instead of doing it directly from cargo as a more cross-platform
  approach, using an actual script must be done given the need to pass
  the environment variable in, hence both shell script and batch file
  are provided.
2026-01-15 19:53:49 -05:00
dependabot[bot]
3087f39805 chore(deps): bump pnpm (#4532)
Bumps the npm_and_yarn group with 1 update in the /examples/counters/e2e directory: [pnpm](https://github.com/pnpm/pnpm/tree/HEAD/pnpm).


Updates `pnpm` from 9.15.9 to 10.27.0
- [Release notes](https://github.com/pnpm/pnpm/releases)
- [Changelog](https://github.com/pnpm/pnpm/blob/v10.27.0/pnpm/CHANGELOG.md)
- [Commits](https://github.com/pnpm/pnpm/commits/v10.27.0/pnpm)

---
updated-dependencies:
- dependency-name: pnpm
  dependency-version: 10.27.0
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-15 19:34:09 -05:00
Greg Johnston
65940cbefa fix: do not show Transition fallback on 2nd change if 1st change resolved synchronously (closes #4492, closes #3868) (#4495) 2025-12-19 10:42:44 -05:00
Marc-Stefan Cassola
1aaa716dfc examples: use ShowLet where appropriate in examples (#4467) 2025-11-28 12:00:26 -05:00
tqq1994516
e6fe7fef07 fix: add response headers for leptos_axum static files #4377 (#4394) 2025-11-22 13:11:53 -05:00
Greg Johnston
eec9edf517 Update README.md 2025-11-11 15:51:21 -05:00
Marco Kuoni
861dcf354c docs: add --split to command for lazy_routes example (#4440) 2025-11-09 20:23:40 -05:00
Greg Johnston
da4a7d5285 examples: clarify behavior of upload-with-progress demo (closes #4397) (#4420) 2025-10-29 21:07:52 -04:00
Greg Johnston
3b9ccdf57e Merge pull request #4334 from leptos-rs/4324
Correctly manage path stack during back navigation
2025-09-26 07:45:25 -04:00
Greg Johnston
b3907baf49 test: add regression test for #4324 2025-09-24 19:23:20 -04:00
Greg Johnston
9a8bb7eb75 test: add regression test for #4251 2025-09-24 19:23:13 -04:00
Greg Johnston
4bca70dc2f chore: specify Tailwind version in Trunk.toml (closes #4315) (#4317) 2025-09-21 14:38:13 -04:00
Greg Johnston
924efa8ac1 feat: minimal support for subsecond and an example (#4307) 2025-09-20 11:40:28 -04:00
Greg Johnston
6f047a2271 test: add regression test for #4296 2025-09-16 16:22:42 -04:00
Greg Johnston
7c942b8b47 chore: correct name for test 2025-09-16 16:07:00 -04:00
Greg Johnston
d4bf6d9cb6 test: add regression test for #4285 2025-09-15 21:05:12 -04:00
Greg Johnston
1340deee96 chore: typo in name of feature test 2025-08-21 19:20:41 -04:00
Greg Johnston
03529b3992 chore: add regression test for #4005 2025-08-20 21:19:35 -04:00
Greg Johnston
8bfd0ce143 chore: add regression test for #4217 2025-08-20 21:11:16 -04:00
Greg Johnston
d33f5c9e77 feat: allow lazy server functions (#4169) 2025-07-24 07:30:05 -04:00
Greg Johnston
ebb33b6f41 Merge remote-tracking branch 'origin' into wasm-splitting-support 2025-07-20 13:09:26 -04:00
martin frances
777b5e1e54 chore: examples - bumped version numbers for sqlx and this error. (#4126) 2025-07-19 21:19:32 -04:00
Greg Johnston
897e6ecc26 example: lazy routes in hackernews_axum 2025-07-19 08:53:02 -04:00
Greg Johnston
232b603a25 feat: support both sync and async lazy functions 2025-07-19 08:53:02 -04:00
Greg Johnston
3fdbae4314 Merge remote-tracking branch 'origin' into wasm-splitting-support 2025-07-17 14:07:29 -04:00
Greg Johnston
c7a319db15 nested concurrent lazy routes 2025-07-17 11:21:05 -04:00
Greg Johnston
0d18da720b fix: rename arguments for lazy routes 2025-07-17 09:27:31 -04:00
Greg Johnston
21fd995468 change: set MSRV to 1.88 (proc-macro spans stabilized = stable hot-reloading) 2025-07-16 18:02:40 -04:00
Greg Johnston
eb9ebc870f regression tests for #4157 and for https://github.com/leptos-rs/cargo-leptos/issues/546 2025-07-16 07:47:30 -04:00
Greg Johnston
4c1e7dc8c1 add README 2025-07-15 20:43:29 -04:00
Greg Johnston
f1fa4635c7 clippy 2025-07-15 09:37:50 -04:00
Greg Johnston
46c8a11eae infrastructure for testing with --split 2025-07-15 09:37:45 -04:00
Greg Johnston
b0ee946412 clean up example 2025-07-12 14:08:00 -04:00
Greg Johnston
b505892568 add lazy-routing example 2025-07-12 14:00:19 -04:00
Saber Haj Rabiee
77176f8395 fix(examples): remove redundant cf-worker example (#4140)
Cloudflare has an official template for leptos https://github.com/cloudflare/workers-rs/blob/main/templates/leptos
2025-07-11 10:35:14 -04:00
Greg Johnston
051059c761 Merge pull request #4115 from leptos-rs/4114-fix
Clean up nested routing ownership and add regression tests
2025-07-01 08:32:52 -04:00
Ryo Hirayama
3c540dd858 Add an example to show server_fn is capable to serve on Cloudflare Workers (#4052)
* Add reqwest-no-ws feature to server_fn

* Add dep:tokio to server_fn/reqwest-no-ws

* Fix

* Refactor reqwest-no-ws feature in server_fn crate for wasm32 support

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Ad cf-worker example

* Fix error messages for trybuild

* Revert "Fix error messages for trybuild"

This reverts commit 42658dd031.

* Fix CI error by disabling on reqwest-no-ws aslike other feature

* Compact deps and add ci

* Revert all server_fn changes as main

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-30 23:44:12 -07:00
Greg Johnston
ae00e5ae13 test: add regression test for nested context on server 2025-06-30 09:49:16 -04:00
Greg Johnston
1ce671ba08 test: fix signal disposal test 2025-06-30 09:46:22 -04:00
Greg Johnston
ff6ae5de25 test: add regression test for signal disposal issue 2025-06-30 08:49:25 -04:00
Greg Johnston
c21712ba04 chore: simplify element_by_id (see #4121) 2025-06-29 17:16:51 -04:00
martin frances
e767518142 chore: updated clippy rule affecting stores example (#4120)
status.done().then_some("line-through").unwrap_or_default()
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if status.done() { "line-through" } else { Default::default() }`
2025-06-28 14:53:27 -04:00
Greg Johnston
9c50e49253 test: add regression test for #4088 2025-06-28 14:15:49 -04:00
Greg Johnston
9fd972971e test: add regression test for back/forward behavior mentioned in #4114 2025-06-27 18:50:28 -04:00
Greg Johnston
9473220639 test: add regression test for #4015 2025-06-27 18:42:30 -04:00
Tommy Yu
adb3e75efc test: e2e that demonstrates failure
- if b37900ec55 from #4091 is reverted the
  failure described in the `pr_4091.feature` will no longer happen.
2025-06-27 22:42:40 +12:00
Tommy Yu
f303aa6d5c test: leptos-rs/leptos#4091 regression 2025-06-27 22:42:40 +12:00
Tommy Yu
73ca3d7b04 Adding a basic regression example 2025-06-27 22:42:40 +12:00
martin frances
d555c1e0ce Removed crate once_cell (#4083)
* Removed crate once_cell

As of rust_version 1.80.0 there are now equivalent options in std.

Async and sync changes are as follows.

-use once_cell::sync::Lazy;
+use std::sync::LazyLock;

-use once_cell::sync::Lazy;
+use std::sync::LazyLock;

* ran cargo fmt.

* fixed server_fn errors.

* cargo fmt fixes.

* "use srd::sync" becomes "use std::sync".

* fixed formatting issue.

* formatting issues.

* Fixed error in examples/server_fns_axum

* more formatting issues.

* more formatting issues.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-16 10:38:32 -07:00
Tommy Yu
798d8a4a9e fix: suspense_test corrected due to previous fix
- The `res_overview` previously being tracked inside the async caused an
  extra fetch to happen, and with that tracking being corrected, this no
  longer happens.
- Left a comment about how this is untracked.
2025-06-11 13:32:32 +12:00