Skip to content

Commit

Permalink
CHANGELOG.md: update
Browse files Browse the repository at this point in the history
  • Loading branch information
niklak committed Nov 9, 2024
1 parent ef08b4d commit 9c3ce3b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

All notable changes to the `dom_query` crate will be documented in this file.

## [Unreleased]
## [0.9.0] - 2024-11-09

### Changing
### Changed

- Using `Tree::merge_with_fn` instead of `Tree::merge` to reduce code duplication.
- `Tree::child_ids_of_it` now require `rev` argument. Set `true` to iterate children in reverse order.
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dom_query"
version = "0.8.0"
version = "0.9.0"
description = "HTML querying and manipulation with CSS seletors"
license = "MIT"
repository = "https://github.com/niklak/dom_query"
Expand All @@ -19,7 +19,7 @@ selectors = "0.26.0"
cssparser = "0.34.0"
tendril = "0.4.3"
foldhash = "0.1.3"
hashbrown = {version = "0.15.0", default-features = false, features = ["allocator-api2", "inline-more", "default-hasher"], optional = true}
hashbrown = {version = "0.15.1", default-features = false, features = ["allocator-api2", "inline-more", "default-hasher"], optional = true}
precomputed-hash = "0.1.1"

[dev-dependencies]
Expand Down
30 changes: 28 additions & 2 deletions tests/selection-traversal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,20 @@ fn test_ancestors_selection_with_limit() {
#[cfg_attr(not(target_arch = "wasm32"), test)]
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
fn test_selection_add_selection() {
let doc: Document = ANCESTORS_CONTENTS.into();
let doc: Document = r#"<!DOCTYPE html>
<html>
<head>Test</head>
<body>
<div id="great-ancestor">
<div id="grand-parent">
<div id="parent">
<div id="first-child">Child</div>
<div id="second-child">Child</div>
</div>
</div>
</div>
</body>
</html>"#.into();

let first_sel = doc.select("#first-child");
assert_eq!(first_sel.length(), 1);
Expand All @@ -403,7 +416,20 @@ fn test_selection_add_selection() {
#[cfg_attr(not(target_arch = "wasm32"), test)]
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
fn test_selection_add() {
let doc: Document = ANCESTORS_CONTENTS.into();
let doc: Document = r#"<!DOCTYPE html>
<html>
<head>Test</head>
<body>
<div id="great-ancestor">
<div id="grand-parent">
<div id="parent">
<div id="first-child">Child</div>
<div id="second-child">Child</div>
</div>
</div>
</div>
</body>
</html>"#.into();

let children_sel = doc.select("#first-child").add("#second-child");
assert_eq!(children_sel.length(), 2);
Expand Down

0 comments on commit 9c3ce3b

Please sign in to comment.