Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,26 @@ jobs:
components: clippy, rustfmt
target: wasm32-unknown-unknown

- name: Check formatting
run: cargo fmt --all --check
- name: Install Cargo Binary Install
uses: cargo-bins/cargo-binstall@main

- name: Install crates
run: cargo binstall -y --force cargo-deny cargo-machete cargo-sort

- name: Lint
run: cargo clippy --all-features --locked

- name: Check dependencies
run: cargo deny check

- name: Check unused dependencies
run: cargo machete

- name: Check manifest formatting
run: cargo sort --workspace --check

- name: Check formatting
run: cargo fmt --all --check
test:
name: Test
runs-on: ubuntu-latest
Expand All @@ -42,7 +56,6 @@ jobs:
uses: actions/checkout@v5

# TODO: Investigate why tests fail on stable toolchain.

- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy, rustfmt
target: wasm32-unknown-unknown

- name: Install Cargo Binary Install
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:

- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy, rustfmt

- name: Check for upstream releases
run: cargo run -p scripts --bin upstream
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy, rustfmt
target: wasm32-unknown-unknown

- name: Install Cargo Binary Install
Expand All @@ -49,7 +48,6 @@ jobs:
- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy, rustfmt
target: wasm32-unknown-unknown

- name: Install Cargo Binary Install
Expand All @@ -59,7 +57,7 @@ jobs:
run: cargo binstall --force -y mdbook mdbook-tabs mdbook-trunk trunk

- name: Install Node.js dependencies
run: npm install
run: npm ci

- name: Build Book
run: mdbook build
Expand Down
39 changes: 32 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,40 @@
repos:
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
- id: clippy

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
language: node
additional_dependencies:
- prettier@^3.3.3
- prettier@^3.6.2
- prettier-plugin-tailwindcss@^0.6.6

- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
- id: clippy

- repo: https://github.com/EmbarkStudios/cargo-deny
rev: 0.18.4
hooks:
- id: cargo-deny

# - repo: https://github.com/bnjbvr/cargo-machete
# rev: ba1bcd4
# hooks:
# - id: cargo-machete
- repo: local
hooks:
- id: cargo-machete
name: cargo-machete
language: rust
entry: cargo machete
types: [file, toml]
files: Cargo\.(toml|lock)
pass_filenames: false

- repo: https://github.com/DevinR528/cargo-sort
rev: v2.0.1
hooks:
- id: cargo-sort
args: ['--workspace']
3 changes: 1 addition & 2 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
"bracketSpacing": false,
"printWidth": 120,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "none"
"tabWidth": 4
}
14 changes: 2 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ floating-ui-leptos = { path = "./packages/leptos", version = "0.5.0" }
floating-ui-utils = { path = "./packages/utils", version = "0.5.0" }
floating-ui-yew = { path = "./packages/yew", version = "0.5.0" }
leptos = "0.8.0"
leptos_router = "0.8.0"
leptos-node-ref = "0.2.0"
leptos_router = "0.8.0"
log = "0.4.22"
send_wrapper = "0.6.0"
serde = { version = "1.0.209", features = ["derive"] }
Expand Down
18 changes: 9 additions & 9 deletions book-examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ license.workspace = true
repository.workspace = true
version.workspace = true

[features]
default = ["arrow", "flip", "placement", "shift", "size", "virtual"]
arrow = []
flip = []
placement = []
shift = []
size = []
virtual = []

[dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
Expand All @@ -19,12 +28,3 @@ leptos-node-ref.workspace = true
log.workspace = true
send_wrapper.workspace = true
tailwind_fuse = "0.3.1"

[features]
default = ["arrow", "flip", "placement", "shift", "size", "virtual"]
arrow = []
flip = []
placement = []
shift = []
size = []
virtual = []
30 changes: 30 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[graph]
all-features = true

[advisories]
ignore = [
{ id = "RUSTSEC-2024-0370", reason = "No safe upgrade is available `proc-macro-error`." },
{ id = "RUSTSEC-2024-0436", reason = "No maintained version available for `paste`." },
]

[bans]
allow-wildcard-paths = true
multiple-versions = "allow"
wildcards = "deny"

[licenses]
allow = [
"Apache-2.0",
"BSD-3-Clause",
"BSL-1.0",
"CC0-1.0",
"ISC",
"MIT",
"Unicode-3.0",
"Zlib",
]
confidence-threshold = 1.0

[sources]
unknown-git = "deny"
unknown-registry = "deny"
3 changes: 3 additions & 0 deletions packages/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ license.workspace = true
repository.workspace = true
version.workspace = true

[package.metadata.cargo-machete]
ignored = ["dyn_std"]

[dependencies]
dyn_derive.workspace = true
dyn_std.workspace = true
Expand Down
4 changes: 1 addition & 3 deletions packages/dioxus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ repository.workspace = true
version.workspace = true

[dependencies]
dyn_derive.workspace = true
dyn_std.workspace = true
floating-ui-dom.workspace = true
dioxus = { workspace = true, features = ["web"] }
floating-ui-dom.workspace = true
web-sys.workspace = true

[dev-dependencies]
Expand Down
2 changes: 0 additions & 2 deletions packages/dioxus/example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ console_log.workspace = true
dioxus.workspace = true
floating-ui-dioxus.workspace = true
log.workspace = true
wasm-bindgen.workspace = true
web-sys.workspace = true
2 changes: 0 additions & 2 deletions packages/leptos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ repository.workspace = true
version.workspace = true

[dependencies]
dyn_derive.workspace = true
dyn_std.workspace = true
floating-ui-dom.workspace = true
leptos.workspace = true
leptos-node-ref.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions packages/leptos/example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ leptos = { workspace = true, features = ["csr"] }
leptos-node-ref.workspace = true
log.workspace = true
send_wrapper.workspace = true
wasm-bindgen.workspace = true
web-sys.workspace = true
2 changes: 1 addition & 1 deletion packages/leptos/tests/visual/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ console_log.workspace = true
convert_case = "0.6.0"
floating-ui-leptos.workspace = true
leptos = { workspace = true, features = ["csr"] }
leptos_router.workspace = true
leptos-node-ref.workspace = true
leptos_router.workspace = true
log.workspace = true
send_wrapper.workspace = true
wasm-bindgen.workspace = true
Expand Down
17 changes: 10 additions & 7 deletions packages/utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@ license.workspace = true
repository.workspace = true
version.workspace = true

[package.metadata.docs.rs]
all-features = true

[package.metadata.cargo-machete]
ignored = ["dyn_std"]

[features]
default = []
dom = ["dep:web-sys"]

[dependencies]
cfg-if.workspace = true
dyn_derive.workspace = true
dyn_std.workspace = true
serde.workspace = true
web-sys = { workspace = true, optional = true }

[features]
default = []
dom = ["dep:web-sys"]

[package.metadata.docs.rs]
all-features = true
2 changes: 1 addition & 1 deletion packages/yew/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ version.workspace = true

[dependencies]
floating-ui-dom.workspace = true
yew.workspace = true
web-sys.workspace = true
yew.workspace = true

[dev-dependencies]
wasm-bindgen-test.workspace = true
2 changes: 0 additions & 2 deletions packages/yew/example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ console_error_panic_hook.workspace = true
console_log.workspace = true
floating-ui-yew.workspace = true
log.workspace = true
wasm-bindgen.workspace = true
web-sys.workspace = true
yew = { workspace = true, features = ["csr"] }
Loading