From 6fc70d4dfc7c2fbbe2beb54974cd161014cf01ac Mon Sep 17 00:00:00 2001 From: Philip Sampaio Date: Fri, 1 Mar 2024 18:03:07 -0300 Subject: [PATCH] Release v0.36.0 --- CHANGELOG.md | 21 ++++++++++++++++++++- README.md | 14 +++++++++++--- mix.exs | 2 +- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a2d7e68..9410f0eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased][unreleased] +## [0.36.0] - 2024-03-01 + +### Added + +- Add `Floki.get_by_id/1` that returns one element by ID or `nil`. + Thanks [@SteffenDE](https://github.com/SteffenDE). + +### Changed + +- Improve options validation with `Keyword.validate!/2`. + This is not a change in APIs, but the error messages and opts validation + should be standardized now. + Thanks [@vittoriabitton](https://github.com/vittoriabitton). + +### Removed + +- Drop support for Elixir v1.12. + ## [0.35.4] - 2024-02-19 Besides the fix described below, this release also contains more performance @@ -746,7 +764,8 @@ of the parent element inside HTML. - Elixir version requirement from "~> 1.0.0" to ">= 1.0.0". -[unreleased]: https://github.com/philss/floki/compare/v0.35.4...HEAD +[unreleased]: https://github.com/philss/floki/compare/v0.36.0...HEAD +[0.36.0]: https://github.com/philss/floki/compare/v0.35.4...v0.36.0 [0.35.4]: https://github.com/philss/floki/compare/v0.35.3...v0.35.4 [0.35.3]: https://github.com/philss/floki/compare/v0.35.2...v0.35.3 [0.35.2]: https://github.com/philss/floki/compare/v0.35.1...v0.35.2 diff --git a/README.md b/README.md index 9d5462c4..7d2581a2 100644 --- a/README.md +++ b/README.md @@ -61,13 +61,21 @@ Add Floki to your `mix.exs`: ```elixir defp deps do [ - {:floki, "~> 0.35.0"} + {:floki, "~> 0.36.0"} ] end ``` After that, run `mix deps.get`. +If you are running on [Livebook](https://livebook.dev) or a script, you can install with `Mix.install/2`: + +```elixir +Mix.install([ + {:floki, "~> 0.36.0"} +]) +``` + You can check the [changelog](CHANGELOG.md) for changes. ## Dependencies @@ -118,7 +126,7 @@ you don't need to install anything to compile it thanks to [RustlerPrecompiled]( ```elixir defp deps do [ - {:floki, "~> 0.35.0"}, + {:floki, "~> 0.36.0"}, {:html5ever, "~> 0.15.0"} ] end @@ -146,7 +154,7 @@ First, add `fast_html` to your dependencies: ```elixir defp deps do [ - {:floki, "~> 0.35.0"}, + {:floki, "~> 0.36.0"}, {:fast_html, "~> 2.0"} ] end diff --git a/mix.exs b/mix.exs index 5ce2d724..b8d84146 100644 --- a/mix.exs +++ b/mix.exs @@ -3,7 +3,7 @@ defmodule Floki.Mixfile do @description "Floki is a simple HTML parser that enables search for nodes using CSS selectors." @source_url "https://github.com/philss/floki" - @version "0.35.4" + @version "0.36.0" def project do [