Skip to content

Commit a3a6291

Browse files
authored
Release v0.38.1 (#662)
* Release v0.38.1 * Improve copy * Bump ExDoc to v0.40 This also removes some of the development mix tasks from docs. * More commits from @preciz * Add the last PR to the list
1 parent a8afbd8 commit a3a6291

File tree

5 files changed

+48
-16
lines changed

5 files changed

+48
-16
lines changed

CHANGELOG.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased][unreleased]
99

10+
## [0.38.1] - 2026-03-17
11+
12+
### Performance
13+
14+
This version contains major performance improvements in the following functions:
15+
16+
* `Floki.filter_out/2`.
17+
* `Floki.find/2` - with some improvements to specific selectors, like classes
18+
and attribute selectors.
19+
* `Floki.text/2`.
20+
21+
Those functions are not only faster, but are now using less memory. Please check
22+
the PRs related to this release if you want to better understand the numbers.
23+
24+
* [Speed up `do_classes_matches?` - #649](https://github.com/philss/floki/pull/649)
25+
* [Make `filter_out` faster - #650](https://github.com/philss/floki/pull/650)
26+
* [Speed up attribute lookup - #651](https://github.com/philss/floki/pull/651)
27+
* [Enable tuple traversal optimization for multiple selectors - #652](https://github.com/philss/floki/pull/652)
28+
* [Optimize `HTMLTree.to_tuple` conversion using `Enum.reduce` - #657](https://github.com/philss/floki/pull/657)
29+
* [Optimize `Finder.get_descendant_ids/2` memory usage and speed - #660](https://github.com/philss/floki/pull/660)
30+
* [Optimize `Finder.get_siblings/2` memory usage and speed - #663](https://github.com/philss/floki/pull/663)
31+
* [Optimize `FlatText.get/3` memory usage and speed - #664](https://github.com/philss/floki/pull/664)
32+
* [Optimize class matching in `Floki.Selector` - #665](https://github.com/philss/floki/pull/665)
33+
34+
All the improvements in this version were made by [Barna Kovacs - @preciz](https://github.com/preciz),
35+
so shout out and thanks to him!
36+
37+
### Fixed
38+
39+
Remove a warning about an unused `require Logger` that pops up when using Elixir v1.20.
40+
1041
## [0.38.0] - 2025-06-14
1142

1243
### Added
@@ -889,7 +920,8 @@ of the parent element inside HTML.
889920

890921
- Elixir version requirement from "~> 1.0.0" to ">= 1.0.0".
891922

892-
[unreleased]: https://github.com/philss/floki/compare/v0.38.0...HEAD
923+
[unreleased]: https://github.com/philss/floki/compare/v0.38.1...HEAD
924+
[0.38.1]: https://github.com/philss/floki/compare/v0.38.0...v0.38.1
893925
[0.38.0]: https://github.com/philss/floki/compare/v0.37.1...v0.38.0
894926
[0.37.1]: https://github.com/philss/floki/compare/v0.37.0...v0.37.1
895927
[0.37.0]: https://github.com/philss/floki/compare/v0.36.3...v0.37.0

lib/mix/tasks/generate_entities.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
defmodule Mix.Tasks.GenerateEntities do
2+
@moduledoc false
23
@shortdoc "Generate the entities module"
34

45
@json_entities_path "priv/entities.json"

lib/mix/tasks/generate_tokenizer_tests.ex

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
defmodule Mix.Tasks.GenerateTokenizerTests do
2-
@moduledoc """
3-
It generates tests based on test files from WHATWG.
4-
5-
This task will take a look at tokenizer test files
6-
that are located in "./test/html5lib-tests/tokenizer"
7-
and generate modules to run those tests.
8-
9-
This is necessary every time the specs of HTML change,
10-
so we can keep up to date and also we can keep track
11-
of what changed.
12-
"""
2+
@moduledoc false
3+
# It generates tests based on test files from WHATWG.
4+
#
5+
# This task will take a look at tokenizer test files
6+
# that are located in "./test/html5lib-tests/tokenizer"
7+
# and generate modules to run those tests.
8+
#
9+
# This is necessary every time the specs of HTML change,
10+
# so we can keep up to date and also we can keep track
11+
# of what changed.
1312

1413
@shortdoc "Generate tokenizer tests based on specs."
1514

mix.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule Floki.Mixfile do
33

44
@description "Floki is a simple HTML parser that enables search for nodes using CSS selectors."
55
@source_url "https://github.com/philss/floki"
6-
@version "0.38.0"
6+
@version "0.38.1"
77

88
def project do
99
[
@@ -45,7 +45,7 @@ defmodule Floki.Mixfile do
4545
[
4646
{:jason, "~> 1.1", only: [:dev, :test, :docs]},
4747
{:earmark, "~> 1.2", only: :dev},
48-
{:ex_doc, "~> 0.38.2", only: :dev, runtime: false},
48+
{:ex_doc, "~> 0.40", only: :dev, runtime: false},
4949
{:benchee, "~> 1.4.0", only: :dev},
5050
{:benchee_html, "~> 1.0", only: :dev},
5151
{:credo, ">= 0.0.0", only: [:dev, :test]},

mix.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
"earmark_parser": {:hex, :earmark_parser, "1.4.44", "f20830dd6b5c77afe2b063777ddbbff09f9759396500cdbe7523efd58d7a339c", [:mix], [], "hexpm", "4778ac752b4701a5599215f7030989c989ffdc4f6df457c5f36938cc2d2a2750"},
1212
"elixir_make": {:hex, :elixir_make, "0.9.0", "6484b3cd8c0cee58f09f05ecaf1a140a8c97670671a6a0e7ab4dc326c3109726", [:mix], [], "hexpm", "db23d4fd8b757462ad02f8aa73431a426fe6671c80b200d9710caf3d1dd0ffdb"},
1313
"erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"},
14-
"ex_doc": {:hex, :ex_doc, "0.38.2", "504d25eef296b4dec3b8e33e810bc8b5344d565998cd83914ffe1b8503737c02", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "732f2d972e42c116a70802f9898c51b54916e542cc50968ac6980512ec90f42b"},
14+
"ex_doc": {:hex, :ex_doc, "0.40.1", "67542e4b6dde74811cfd580e2c0149b78010fd13001fda7cfeb2b2c2ffb1344d", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "bcef0e2d360d93ac19f01a85d58f91752d930c0a30e2681145feea6bd3516e00"},
1515
"fast_html": {:hex, :fast_html, "2.4.1", "73142526cee294b0ec8cf122483f32c861e4a9d988c60cd04f63ce7fd9e5a620", [:make, :mix], [{:elixir_make, "~> 0.4", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 1.1", [hex: :nimble_pool, repo: "hexpm", optional: false]}], "hexpm", "767a63ecc941d3fc0e0e9609ded1a5e798398e5b1bf4d2f47bcb5992a86b32cf"},
1616
"file_system": {:hex, :file_system, "1.1.0", "08d232062284546c6c34426997dd7ef6ec9f8bbd090eb91780283c9016840e8f", [:mix], [], "hexpm", "bfcf81244f416871f2a2e15c1b515287faa5db9c6bcf290222206d120b3d43f6"},
1717
"html5ever": {:hex, :html5ever, "0.16.1", "3dccc3349e0c3e5f5542bcc09253e6246d174391aca692bdecccd446a1c62132", [:mix], [{:rustler, ">= 0.0.0", [hex: :rustler, repo: "hexpm", optional: true]}, {:rustler_precompiled, "~> 0.6.0 or ~> 0.7.0", [hex: :rustler_precompiled, repo: "hexpm", optional: false]}], "hexpm", "6eb06b7796eb100bc815dffd3f500de376a426a088a8405402305cdd8e7cc08a"},
1818
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
1919
"makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"},
2020
"makeup_elixir": {:hex, :makeup_elixir, "1.0.1", "e928a4f984e795e41e3abd27bfc09f51db16ab8ba1aebdba2b3a575437efafc2", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "7284900d412a3e5cfd97fdaed4f5ed389b8f2b4cb49efc0eb3bd10e2febf9507"},
21-
"makeup_erlang": {:hex, :makeup_erlang, "1.0.2", "03e1804074b3aa64d5fad7aa64601ed0fb395337b982d9bcf04029d68d51b6a7", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "af33ff7ef368d5893e4a267933e7744e46ce3cf1f61e2dccf53a111ed3aa3727"},
21+
"makeup_erlang": {:hex, :makeup_erlang, "1.0.3", "4252d5d4098da7415c390e847c814bad3764c94a814a0b4245176215615e1035", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "953297c02582a33411ac6208f2c6e55f0e870df7f80da724ed613f10e6706afd"},
2222
"nimble_parsec": {:hex, :nimble_parsec, "1.4.2", "8efba0122db06df95bfaa78f791344a89352ba04baedd3849593bfce4d0dc1c6", [:mix], [], "hexpm", "4b21398942dda052b403bbe1da991ccd03a053668d147d53fb8c4e0efe09c973"},
2323
"nimble_pool": {:hex, :nimble_pool, "1.1.0", "bf9c29fbdcba3564a8b800d1eeb5a3c58f36e1e11d7b7fb2e084a643f645f06b", [:mix], [], "hexpm", "af2e4e6b34197db81f7aad230c1118eac993acc0dae6bc83bac0126d4ae0813a"},
2424
"rustler_precompiled": {:hex, :rustler_precompiled, "0.7.1", "ecadf02cc59a0eccbaed6c1937303a5827fbcf60010c541595e6d3747d3d0f9f", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:rustler, "~> 0.23", [hex: :rustler, repo: "hexpm", optional: true]}], "hexpm", "b9e4657b99a1483ea31502e1d58c464bedebe9028808eda45c3a429af4550c66"},

0 commit comments

Comments
 (0)