1.13.0 / 2022-01-06 #2412
flavorjones
announced in
Releases
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
1.13.0 / 2022-01-06
Notes
Ruby
This release introduces native gem support for Ruby 3.1. Please note that Windows users should use the
x64-mingw-ucrtplatform gem for Ruby 3.1, andx64-mingw32for Ruby 2.6–3.0 (see RubyInstaller 3.1.0 release notes).This release ends support for:
Faster, more reliable installation: Native Gem for ARM64 Linux
This version of Nokogiri ships experimental native gem support for the
aarch64-linuxplatform, which should support AWS Graviton and other ARM Linux platforms. We don't yet have CI running for this platform, and so we're interested in hearing back from y'all whether this is working, and what problems you're seeing. Please send us feedback here: Feedback: Have you used theaarch64-linuxnative gem?Publishing
This version of Nokogiri opts-in to the "MFA required to publish" setting on Rubygems.org. This and all future Nokogiri gem files must be published to Rubygems by an account with multi-factor authentication enabled. This should provide some additional protection against supply-chain attacks.
A related discussion about Trust exists at #2357 in which I invite you to participate if you have feelings or opinions on this topic.
Dependencies
LICENSE-DEPENDENCIES.mdfor more information.) [#2206]~> 2.6.1to~> 2.7.0. ("ruby" platform gem only.)Improved
{XML,HTML4}::DocumentFragmentconstructors all now take an optional parse options parameter or block (similar to Document constructors). [#1692] (Thanks, @JackMc!)Nokogiri::CSS.xpath_forallows anXPathVisitorto be injected, for finer-grained control over how CSS queries are translated into XPath.XML::Reader#encodingwill return the encoding detected by the parser when it's not passed to the constructor. [#980]Node#lineis no longer capped at 65535. libxml v2.9.0 and later support a new parse option, exposed asNokogiri::XML::ParseOptions::PARSE_BIG_LINES, which is turned on by default inParseOptions::DEFAULT_{XML,XSLT,HTML,SCHEMA}(Note that JRuby already supported large line numbers.) [#1764, #1493, #1617, #1505, #1003, #533]RuntimeErroris raised. libxml2 does no checking for this, which means cycles would otherwise result in infinite loops on subsequent operations. (Note that JRuby already did this.) [#1912]Node#linebehavior has been modified to return the line number of the node in the final DOM structure. This behavior is different from CRuby, which returns the node's position in the input string. Ideally the two implementations would be the same, but at least is now officially documented and tested. The real-world impact of this change is that the value returned in JRuby is greater by 1 to account for the XML prolog in the output. [#2380] (Thanks, @dabdine!)Fixed
XML::Builderblocks restore context properly when exceptions are raised. [#2372] (Thanks, @ric2b and @rinthedev!)Nokogiri::CSS::Parsercache now uses theXPathVisitorconfiguration as part of the cache key, preventing incorrect cache results from being returned when multipleXPathVisitoroptions are being used.Node#parse) now always uses the correctDocumentFragmentclass. PreviouslyNokogiri::HTML4::DocumentFragmentwas always used, even for XML documents. [#1158]DocumentFragment#>now works properly, matching a CSS selector against only the fragment roots. [#1857]XML::DocumentFragment#errorsnow correctly contains any parsing errors encountered. Previously this was always empty. (Note thatHTML::DocumentFragment#errorsalready did this.)Document#canonicalizewhen inclusive namespaces are passed in. [#2345]Document#canonicalizewhen an argument type error is raised. [#2345]EncodingHandlerwhere iconv handlers were not being cleaned up. [#2345]Reader#base_uriwhere the string returned by libxml2 was not freed. [#2347]Namespacefrom aNodeSetno longer modifies thehrefto be the default namespace URL.Deprecated
Nokogiri::XML::Nodeas the second parameter toNode.newis deprecated and will generate a warning. This parameter should be a kind ofNokogiri::XML::Document. This will become an error in a future version of Nokogiri. [#975]Nokogiri::CSS::Parser,Nokogiri::CSS::Tokenizer, andNokogiri::CSS::Nodeare now internal-only APIs that are no longer documented, and should not be considered stable. With the introduction ofXPathVisitorinjection intoNokogiri::CSS.xpath_forthere should be no reason to rely on these internal APIs.Nokogiri::CSS::XPathVisitorAlwaysUseBuiltinsandXPathVisitorOptimallyUseBuiltinsare deprecated. PreferNokogiri::CSS::XPathVisitorwith appropriate constructor arguments. These classes will be removed in a future version of Nokogiri.SHA256 checksums:
This discussion was created from the release 1.13.0 / 2022-01-06.
Beta Was this translation helpful? Give feedback.
All reactions