mirror of
https://github.com/leptos-rs/leptos.git
synced 2025-12-27 09:54:41 -05:00
v0.2.3: fix broken stable support (#670)
This commit is contained in:
5
.github/workflows/check-examples.yml
vendored
5
.github/workflows/check-examples.yml
vendored
@@ -11,7 +11,7 @@ env:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test on ${{ matrix.os }} (using rustc ${{ matrix.rust }})
|
||||
name: Check examples ${{ matrix.os }} (using rustc ${{ matrix.rust }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -39,9 +39,6 @@ jobs:
|
||||
- name: Cargo generate-lockfile
|
||||
run: cargo generate-lockfile
|
||||
|
||||
- name: Run Rustfmt
|
||||
run: cargo fmt -- --check
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Run cargo check on all examples
|
||||
|
||||
45
.github/workflows/check-stable.yml
vendored
Normal file
45
.github/workflows/check-stable.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Check examples ${{ matrix.os }} (using rustc ${{ matrix.rust }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
rust:
|
||||
- stable
|
||||
os:
|
||||
- ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
override: true
|
||||
components: rustfmt
|
||||
|
||||
- name: Add wasm32-unknown-unknown
|
||||
run: rustup target add wasm32-unknown-unknown
|
||||
|
||||
- name: Setup cargo-make
|
||||
uses: davidB/rust-cargo-make@v1
|
||||
|
||||
- name: Cargo generate-lockfile
|
||||
run: cargo generate-lockfile
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Run cargo check on all examples
|
||||
run: cargo make check-stable
|
||||
5
.github/workflows/check.yml
vendored
5
.github/workflows/check.yml
vendored
@@ -11,7 +11,7 @@ env:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test on ${{ matrix.os }} (using rustc ${{ matrix.rust }})
|
||||
name: Run `cargo check` ${{ matrix.os }} (using rustc ${{ matrix.rust }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -39,9 +39,6 @@ jobs:
|
||||
- name: Cargo generate-lockfile
|
||||
run: cargo generate-lockfile
|
||||
|
||||
- name: Run Rustfmt
|
||||
run: cargo fmt -- --check
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Run cargo check on all libraries
|
||||
|
||||
34
.github/workflows/fmt.yml
vendored
Normal file
34
.github/workflows/fmt.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Run rustfmt
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
rust:
|
||||
- nightly
|
||||
os:
|
||||
- ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
override: true
|
||||
components: rustfmt
|
||||
|
||||
- name: Run Rustfmt
|
||||
run: cargo fmt -- --check
|
||||
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
@@ -11,7 +11,7 @@ env:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test on ${{ matrix.os }} (using rustc ${{ matrix.rust }})
|
||||
name: Run tests ${{ matrix.os }} (using rustc ${{ matrix.rust }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -39,9 +39,6 @@ jobs:
|
||||
- name: Cargo generate-lockfile
|
||||
run: cargo generate-lockfile
|
||||
|
||||
- name: Run Rustfmt
|
||||
run: cargo fmt -- --check
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Run tests with all features
|
||||
|
||||
28
Cargo.toml
28
Cargo.toml
@@ -25,22 +25,22 @@ members = [
|
||||
exclude = ["benchmarks", "examples"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
|
||||
[workspace.dependencies]
|
||||
leptos = { path = "./leptos", default-features = false, version = "0.2.2" }
|
||||
leptos_dom = { path = "./leptos_dom", default-features = false, version = "0.2.2" }
|
||||
leptos_hot_reload = { path = "./leptos_hot_reload", version = "0.2.2" }
|
||||
leptos_macro = { path = "./leptos_macro", default-features = false, version = "0.2.2" }
|
||||
leptos_reactive = { path = "./leptos_reactive", default-features = false, version = "0.2.2" }
|
||||
leptos_server = { path = "./leptos_server", default-features = false, version = "0.2.2" }
|
||||
server_fn = { path = "./server_fn", default-features = false, version = "0.2.2" }
|
||||
server_fn_macro = { path = "./server_fn_macro", default-features = false, version = "0.2.2" }
|
||||
server_fn_macro_default = { path = "./server_fn/server_fn_macro_default", default-features = false, version = "0.2.2" }
|
||||
leptos_config = { path = "./leptos_config", default-features = false, version = "0.2.2" }
|
||||
leptos_router = { path = "./router", version = "0.2.2" }
|
||||
leptos_meta = { path = "./meta", default-feature = false, version = "0.2.2" }
|
||||
leptos_integration_utils = { path = "./integrations/utils", version = "0.2.2" }
|
||||
leptos = { path = "./leptos", default-features = false, version = "0.2.3" }
|
||||
leptos_dom = { path = "./leptos_dom", default-features = false, version = "0.2.3" }
|
||||
leptos_hot_reload = { path = "./leptos_hot_reload", version = "0.2.3" }
|
||||
leptos_macro = { path = "./leptos_macro", default-features = false, version = "0.2.3" }
|
||||
leptos_reactive = { path = "./leptos_reactive", default-features = false, version = "0.2.3" }
|
||||
leptos_server = { path = "./leptos_server", default-features = false, version = "0.2.3" }
|
||||
server_fn = { path = "./server_fn", default-features = false, version = "0.2.3" }
|
||||
server_fn_macro = { path = "./server_fn_macro", default-features = false, version = "0.2.3" }
|
||||
server_fn_macro_default = { path = "./server_fn/server_fn_macro_default", default-features = false, version = "0.2.3" }
|
||||
leptos_config = { path = "./leptos_config", default-features = false, version = "0.2.3" }
|
||||
leptos_router = { path = "./router", version = "0.2.3" }
|
||||
leptos_meta = { path = "./meta", default-feature = false, version = "0.2.3" }
|
||||
leptos_integration_utils = { path = "./integrations/utils", version = "0.2.3" }
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
# make tasks run at the workspace root
|
||||
default_to_workspace = false
|
||||
|
||||
[tasks.ci]
|
||||
dependencies = ["check", "check-examples", "test"]
|
||||
|
||||
[tasks.check]
|
||||
clear = true
|
||||
dependencies = ["check-all", "check-wasm"]
|
||||
@@ -28,9 +25,7 @@ clear = true
|
||||
dependencies = [
|
||||
{ name = "check", path = "examples/counter" },
|
||||
{ name = "check", path = "examples/counter_isomorphic" },
|
||||
{ name = "check", path = "examples/counter_without_macros" },
|
||||
{ name = "check", path = "examples/counters" },
|
||||
{ name = "check", path = "examples/counters_stable" },
|
||||
{ name = "check", path = "examples/error_boundary" },
|
||||
{ name = "check", path = "examples/errors_axum" },
|
||||
{ name = "check", path = "examples/fetch" },
|
||||
@@ -49,6 +44,13 @@ dependencies = [
|
||||
{ name = "check", path = "examples/todomvc" },
|
||||
]
|
||||
|
||||
[tasks.check-stable]
|
||||
clear = true
|
||||
dependencies = [
|
||||
{ name = "check", path = "examples/counter_without_macros" },
|
||||
{ name = "check", path = "examples/counters_stable" },
|
||||
]
|
||||
|
||||
[tasks.test]
|
||||
clear = true
|
||||
dependencies = ["test-all"]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[tasks.build]
|
||||
command = "cargo"
|
||||
args = ["+nightly", "build-all-features"]
|
||||
args = ["+stable", "build-all-features"]
|
||||
install_crate = "cargo-all-features"
|
||||
|
||||
[tasks.check]
|
||||
command = "cargo"
|
||||
args = ["+nightly", "check-all-features"]
|
||||
args = ["+stable", "check-all-features"]
|
||||
install_crate = "cargo-all-features"
|
||||
|
||||
@@ -40,7 +40,11 @@ default = ["ssr"]
|
||||
csr = ["leptos_dom/web", "leptos_reactive/csr"]
|
||||
hydrate = ["leptos_dom/web", "leptos_reactive/hydrate"]
|
||||
ssr = ["leptos_dom/ssr", "leptos_reactive/ssr"]
|
||||
stable = ["leptos_dom/stable", "leptos_reactive/stable"]
|
||||
stable = [
|
||||
"leptos_dom/stable",
|
||||
"leptos_reactive/stable",
|
||||
"server_fn_macro/stable",
|
||||
]
|
||||
tracing = []
|
||||
|
||||
[package.metadata.cargo-all-features]
|
||||
|
||||
@@ -40,6 +40,7 @@ stable = [
|
||||
#"leptos/stable",
|
||||
"leptos_dom/stable",
|
||||
"leptos_reactive/stable",
|
||||
"server_fn/stable",
|
||||
]
|
||||
|
||||
[package.metadata.cargo-all-features]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "leptos_meta"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
edition = "2021"
|
||||
authors = ["Greg Johnston"]
|
||||
license = "MIT"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "leptos_router"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
edition = "2021"
|
||||
authors = ["Greg Johnston"]
|
||||
license = "MIT"
|
||||
|
||||
@@ -9,7 +9,7 @@ description = "RPC for any web framework."
|
||||
readme = "../README.md"
|
||||
|
||||
[dependencies]
|
||||
server_fn_macro_default = { path = "./server_fn_macro_default", version = "0.2.0" }
|
||||
server_fn_macro_default = { workspace = true }
|
||||
form_urlencoded = "1"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_urlencoded = "0.7"
|
||||
@@ -33,3 +33,4 @@ once_cell = "1.17.1"
|
||||
|
||||
[features]
|
||||
ssr = []
|
||||
stable = ["server_fn_macro_default/stable"]
|
||||
|
||||
@@ -16,5 +16,8 @@ syn = { version = "1", features = ["full"] }
|
||||
server_fn_macro = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
server_fn = { workspace = true }
|
||||
server_fn = { version = "0.2" }
|
||||
serde = "1"
|
||||
|
||||
[features]
|
||||
stable = []
|
||||
|
||||
@@ -18,3 +18,6 @@ proc-macro2 = "1"
|
||||
proc-macro-error = "1"
|
||||
xxhash-rust = { version = "0.8.6", features = ["const_xxh64"] }
|
||||
const_format = "0.2.30"
|
||||
|
||||
[features]
|
||||
stable = []
|
||||
|
||||
@@ -276,7 +276,7 @@ impl Parse for ServerFnName {
|
||||
"\"Cbor\"" => syn::parse_quote!(Encoding::Cbor),
|
||||
_ => abort!(encoding, "Encoding Not Found"),
|
||||
})
|
||||
.unwrap_or(syn::parse_quote!(Encoding::Url));
|
||||
.unwrap_or_else(|_| syn::parse_quote!(Encoding::Url));
|
||||
|
||||
Ok(Self {
|
||||
struct_name,
|
||||
|
||||
Reference in New Issue
Block a user