nokogiri 1.15.6-x64-mingw-ucrt → 1.16.0.rc1-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of nokogiri might be problematic. Click here for more details.

Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +11 -14
  3. data/README.md +1 -1
  4. data/dependencies.yml +6 -5
  5. data/ext/nokogiri/extconf.rb +3 -4
  6. data/ext/nokogiri/html4_sax_push_parser.c +1 -1
  7. data/ext/nokogiri/include/libxml2/libxml/HTMLparser.h +23 -0
  8. data/ext/nokogiri/include/libxml2/libxml/SAX.h +0 -2
  9. data/ext/nokogiri/include/libxml2/libxml/SAX2.h +0 -2
  10. data/ext/nokogiri/include/libxml2/libxml/c14n.h +0 -2
  11. data/ext/nokogiri/include/libxml2/libxml/dict.h +1 -0
  12. data/ext/nokogiri/include/libxml2/libxml/encoding.h +16 -14
  13. data/ext/nokogiri/include/libxml2/libxml/entities.h +4 -0
  14. data/ext/nokogiri/include/libxml2/libxml/globals.h +15 -503
  15. data/ext/nokogiri/include/libxml2/libxml/hash.h +57 -61
  16. data/ext/nokogiri/include/libxml2/libxml/nanoftp.h +2 -2
  17. data/ext/nokogiri/include/libxml2/libxml/parser.h +128 -18
  18. data/ext/nokogiri/include/libxml2/libxml/parserInternals.h +1 -0
  19. data/ext/nokogiri/include/libxml2/libxml/relaxng.h +2 -1
  20. data/ext/nokogiri/include/libxml2/libxml/schemasInternals.h +1 -0
  21. data/ext/nokogiri/include/libxml2/libxml/schematron.h +1 -0
  22. data/ext/nokogiri/include/libxml2/libxml/threads.h +4 -11
  23. data/ext/nokogiri/include/libxml2/libxml/tree.h +68 -20
  24. data/ext/nokogiri/include/libxml2/libxml/uri.h +2 -1
  25. data/ext/nokogiri/include/libxml2/libxml/valid.h +2 -0
  26. data/ext/nokogiri/include/libxml2/libxml/xmlIO.h +65 -12
  27. data/ext/nokogiri/include/libxml2/libxml/xmlerror.h +37 -8
  28. data/ext/nokogiri/include/libxml2/libxml/xmlmemory.h +37 -40
  29. data/ext/nokogiri/include/libxml2/libxml/xmlreader.h +6 -0
  30. data/ext/nokogiri/include/libxml2/libxml/xmlregexp.h +2 -9
  31. data/ext/nokogiri/include/libxml2/libxml/xmlsave.h +9 -0
  32. data/ext/nokogiri/include/libxml2/libxml/xmlschemas.h +3 -0
  33. data/ext/nokogiri/include/libxml2/libxml/xmlversion.h +28 -43
  34. data/ext/nokogiri/include/libxml2/libxml/xpath.h +1 -1
  35. data/ext/nokogiri/include/libxml2/libxml/xpathInternals.h +2 -1
  36. data/ext/nokogiri/include/libxml2/libxml/xpointer.h +5 -4
  37. data/ext/nokogiri/include/libxslt/xsltconfig.h +1 -1
  38. data/ext/nokogiri/nokogiri.h +10 -3
  39. data/ext/nokogiri/test_global_handlers.c +1 -1
  40. data/ext/nokogiri/xml_cdata.c +1 -2
  41. data/ext/nokogiri/xml_document.c +3 -3
  42. data/ext/nokogiri/xml_namespace.c +0 -4
  43. data/ext/nokogiri/xml_node.c +5 -8
  44. data/ext/nokogiri/xml_reader.c +1 -44
  45. data/ext/nokogiri/xml_relax_ng.c +1 -1
  46. data/ext/nokogiri/xml_sax_push_parser.c +1 -1
  47. data/ext/nokogiri/xml_schema.c +2 -3
  48. data/ext/nokogiri/xml_syntax_error.c +3 -3
  49. data/ext/nokogiri/xml_text.c +1 -2
  50. data/ext/nokogiri/xml_xpath_context.c +2 -5
  51. data/gumbo-parser/Makefile +15 -0
  52. data/lib/nokogiri/3.1/nokogiri.so +0 -0
  53. data/lib/nokogiri/3.2/nokogiri.so +0 -0
  54. data/lib/nokogiri/3.3/nokogiri.so +0 -0
  55. data/lib/nokogiri/css/parser_extras.rb +1 -1
  56. data/lib/nokogiri/css/xpath_visitor.rb +1 -21
  57. data/lib/nokogiri/html4/document.rb +1 -1
  58. data/lib/nokogiri/html4/encoding_reader.rb +1 -1
  59. data/lib/nokogiri/html5.rb +0 -66
  60. data/lib/nokogiri/version/constant.rb +1 -1
  61. data/lib/nokogiri/version/info.rb +6 -5
  62. data/lib/nokogiri/xml/attr.rb +2 -2
  63. data/lib/nokogiri/xml/document.rb +3 -3
  64. data/lib/nokogiri/xml/document_fragment.rb +2 -2
  65. data/lib/nokogiri/xml/namespace.rb +1 -2
  66. data/lib/nokogiri/xml/node.rb +6 -5
  67. data/lib/nokogiri/xml/node_set.rb +3 -3
  68. data/lib/nokogiri/xml/searchable.rb +3 -3
  69. data/lib/nokogiri/xml/syntax_error.rb +1 -1
  70. data/lib/nokogiri/xml.rb +1 -1
  71. data/lib/nokogiri/xslt.rb +1 -1
  72. data/lib/nokogiri.rb +1 -1
  73. metadata +6 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b04eae274a5cf4db80e8edc70874101d9d92db7127a7d76b980a073e09c96b6
4
- data.tar.gz: f5373ad08e23d4d96e9f5f9e82d286019097fa16bd523b2740619ba438c94384
3
+ metadata.gz: 91de3c496fbaee4dc5ba6af6ac2b247cb879ef031597c5136de532df799f5dff
4
+ data.tar.gz: d3c35b93d44127458aedf774f070036547fc6b00ffa5c607658a51728116845e
5
5
  SHA512:
6
- metadata.gz: 208c4eb80ce46e483aa6f2e3a8f5475ecea852b5c91e28cc16e1544fb7f1273e51b69026597b7556ddfb349d9d89032fbe0f16d4c05525069170674cbb555c7b
7
- data.tar.gz: 722f3299ebe46637c038c841455d6570fd7d36d5e2f657679325ebb44462c76b61f10c2396cb97414dc6d4f8249d087a96154e8aad3d610133c0ea45668e2be4
6
+ metadata.gz: b7f90e2954263b2ffed1855f50d0b8f9221e44819dd4c41ee711b6667f9b53e9f8e6303af5fc3648cdab9558900718d55d529650191a97f69331c32fd3ad3d55
7
+ data.tar.gz: 960a402b5561693e1c5353e1a6f39882267fe8ae7297a06c8c3f330eafa29d6169bec069b09023df931a9436737eeccedff1400fa0057998b5dd3d73aa5a5500
data/Gemfile CHANGED
@@ -7,33 +7,30 @@ gemspec
7
7
  group :development do
8
8
  # bootstrapping
9
9
  gem "bundler", "~> 2.3"
10
- gem "rake", "= 13.0.6"
10
+ gem "rake", "13.1.0"
11
11
 
12
12
  # building extensions
13
- gem "rake-compiler", "= 1.2.1"
14
- gem "rake-compiler-dock", "= 1.3.0"
15
-
16
- # documentation
17
- gem "hoe-markdown", "= 1.4.0"
13
+ gem "rake-compiler", "1.2.5"
14
+ gem "rake-compiler-dock", "1.4.0.rc2"
18
15
 
19
16
  # parser generator
20
17
  gem "rexical", "= 1.0.7"
21
18
 
22
19
  # tests
23
- gem "minitest", "5.18.0"
24
- gem "minitest-reporters", "1.6.0"
25
- gem "ruby_memcheck", "1.3.2"
20
+ gem "minitest", "5.20.0"
21
+ gem "minitest-parallel_fork", "2.0.0"
22
+ gem "ruby_memcheck", "2.2.1"
26
23
  gem "rubyzip", "~> 2.3.2"
27
24
  gem "simplecov", "= 0.21.2"
28
25
 
29
26
  # rubocop
30
27
  if Gem::Requirement.new("~> 3.0").satisfied_by?(Gem::Version.new(RUBY_VERSION))
31
- gem "rubocop", "1.51.0"
32
- gem "rubocop-minitest", "0.31.0"
28
+ gem "rubocop", "1.58.0"
29
+ gem "rubocop-minitest", "0.33.0"
33
30
  gem "rubocop-packaging", "0.5.2"
34
- gem "rubocop-performance", "1.18.0"
31
+ gem "rubocop-performance", "1.19.1"
35
32
  gem "rubocop-rake", "= 0.6.0"
36
- gem "rubocop-shopify", "2.13.0"
33
+ gem "rubocop-shopify", "2.14.0"
37
34
  end
38
35
  end
39
36
 
@@ -41,5 +38,5 @@ end
41
38
  # `bundle config set --local without rdoc`
42
39
  # Then re-run `bundle install`.
43
40
  group :rdoc do
44
- gem "rdoc", "6.5.0"
41
+ gem "rdoc", "6.6.1"
45
42
  end
data/README.md CHANGED
@@ -111,7 +111,7 @@ You can help sponsor the maintainers of this software through one of these organ
111
111
 
112
112
  Requirements:
113
113
 
114
- - Ruby >= 2.7
114
+ - Ruby >= 3.0
115
115
  - JRuby >= 9.4.0.0
116
116
 
117
117
 
data/dependencies.yml CHANGED
@@ -1,7 +1,8 @@
1
+
1
2
  libxml2:
2
- version: "2.11.7"
3
- sha256: "fb27720e25eaf457f94fd3d7189bcf2626c6dccf4201553bc8874d50e3560162"
4
- # sha-256 hash provided in https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.7.sha256sum
3
+ version: "2.12.3"
4
+ sha256: "8c8f1092340a89ff32bc44ad5c9693aff9bc8a7a3e161bb239666e5d15ac9aaa"
5
+ # sha-256 hash provided in https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.3.sha256sum
5
6
 
6
7
  libxslt:
7
8
  version: "1.1.39"
@@ -9,8 +10,8 @@ libxslt:
9
10
  # sha-256 hash provided in https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.39.sha256sum
10
11
 
11
12
  zlib:
12
- version: "1.2.13"
13
- sha256: "b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30"
13
+ version: "1.3"
14
+ sha256: "ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e"
14
15
  # SHA-256 hash provided on http://zlib.net/
15
16
 
16
17
  libiconv:
@@ -443,7 +443,7 @@ def process_recipe(name, version, static_p, cross_p, cacheable_p = true)
443
443
  # We use 'host' to set compiler prefix for cross-compiling. Prefer host_alias over host. And
444
444
  # prefer i686 (what external dev tools use) to i386 (what ruby's configure.ac emits).
445
445
  recipe.host = RbConfig::CONFIG["host_alias"].empty? ? RbConfig::CONFIG["host"] : RbConfig::CONFIG["host_alias"]
446
- recipe.host = recipe.host.gsub(/i386/, "i686")
446
+ recipe.host = recipe.host.gsub("i386", "i686")
447
447
 
448
448
  recipe.target = File.join(PACKAGE_ROOT_DIR, "ports") if cacheable_p
449
449
  recipe.configure_options << "--libdir=#{File.join(recipe.path, "lib")}"
@@ -651,8 +651,7 @@ append_cppflags(ENV["CPPFLAGS"].split) unless ENV["CPPFLAGS"].nil?
651
651
  append_ldflags(ENV["LDFLAGS"].split) unless ENV["LDFLAGS"].nil?
652
652
  $LIBS = concat_flags($LIBS, ENV["LIBS"])
653
653
 
654
- # nokogumbo code uses C90/C99 features, let's make sure older compilers won't give
655
- # errors/warnings. see #2302
654
+ # libgumbo uses C90/C99 features, see #2302
656
655
  append_cflags(["-std=c99", "-Wno-declaration-after-statement"])
657
656
 
658
657
  # gumbo html5 serialization is slower with O3, let's make sure we use O2
@@ -919,6 +918,7 @@ else
919
918
  "--with-c14n",
920
919
  "--with-debug",
921
920
  "--with-threads",
921
+ "--without-tls", # see https://github.com/sparklemotion/nokogiri/issues/3031
922
922
  "CPPFLAGS=#{cppflags}",
923
923
  "CFLAGS=#{cflags}",
924
924
  ]
@@ -1087,7 +1087,6 @@ have_func("xmlRelaxNGSetParserStructuredErrors") # introduced in libxml 2.6.24
1087
1087
  have_func("xmlRelaxNGSetValidStructuredErrors") # introduced in libxml 2.6.21
1088
1088
  have_func("xmlSchemaSetValidStructuredErrors") # introduced in libxml 2.6.23
1089
1089
  have_func("xmlSchemaSetParserStructuredErrors") # introduced in libxml 2.6.23
1090
- have_func("rb_gc_location") # introduced in Ruby 2.7
1091
1090
  have_func("rb_category_warning") # introduced in Ruby 3.0
1092
1091
 
1093
1092
  other_library_versions_string = OTHER_LIBRARY_VERSIONS.map { |k, v| [k, v].join(":") }.join(",")
@@ -32,7 +32,7 @@ native_write(VALUE self, VALUE _chunk, VALUE _last_chunk)
32
32
 
33
33
  if ((status != 0) && !(ctx->options & XML_PARSE_RECOVER)) {
34
34
  // TODO: there appear to be no tests for this block
35
- xmlErrorPtr e = xmlCtxtGetLastError(ctx);
35
+ xmlErrorConstPtr e = xmlCtxtGetLastError(ctx);
36
36
  Nokogiri_error_raise(NULL, e);
37
37
  }
38
38
 
@@ -80,6 +80,23 @@ struct _htmlEntityDesc {
80
80
  const char *desc; /* the description */
81
81
  };
82
82
 
83
+ /** DOC_DISABLE */
84
+ #ifdef LIBXML_SAX1_ENABLED
85
+ #define XML_GLOBALS_HTML \
86
+ XML_OP(htmlDefaultSAXHandler, xmlSAXHandlerV1, XML_DEPRECATED)
87
+ #else
88
+ #define XML_GLOBALS_HTML
89
+ #endif
90
+
91
+ #define XML_OP XML_DECLARE_GLOBAL
92
+ XML_GLOBALS_HTML
93
+ #undef XML_OP
94
+
95
+ #if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
96
+ #define htmlDefaultSAXHandler XML_GLOBAL_MACRO(htmlDefaultSAXHandler)
97
+ #endif
98
+ /** DOC_ENABLE */
99
+
83
100
  /*
84
101
  * There is only few public functions.
85
102
  */
@@ -316,5 +333,11 @@ XMLPUBFUN htmlStatus htmlNodeStatus(const htmlNodePtr, int) ;
316
333
  }
317
334
  #endif
318
335
 
336
+ #else /* LIBXML_HTML_ENABLED */
337
+
338
+ /** DOC_DISABLE */
339
+ #define XML_GLOBALS_HTML
340
+ /** DOC_ENABLE */
341
+
319
342
  #endif /* LIBXML_HTML_ENABLED */
320
343
  #endif /* __HTML_PARSER_H__ */
@@ -12,8 +12,6 @@
12
12
  #ifndef __XML_SAX_H__
13
13
  #define __XML_SAX_H__
14
14
 
15
- #include <stdio.h>
16
- #include <stdlib.h>
17
15
  #include <libxml/xmlversion.h>
18
16
  #include <libxml/parser.h>
19
17
 
@@ -12,8 +12,6 @@
12
12
  #ifndef __XML_SAX2_H__
13
13
  #define __XML_SAX2_H__
14
14
 
15
- #include <stdio.h>
16
- #include <stdlib.h>
17
15
  #include <libxml/xmlversion.h>
18
16
  #include <libxml/parser.h>
19
17
 
@@ -20,7 +20,6 @@
20
20
  #include <libxml/xmlversion.h>
21
21
 
22
22
  #ifdef LIBXML_C14N_ENABLED
23
- #ifdef LIBXML_OUTPUT_ENABLED
24
23
 
25
24
  #include <libxml/tree.h>
26
25
  #include <libxml/xpath.h>
@@ -122,7 +121,6 @@ XMLPUBFUN int
122
121
  }
123
122
  #endif /* __cplusplus */
124
123
 
125
- #endif /* LIBXML_OUTPUT_ENABLED */
126
124
  #endif /* LIBXML_C14N_ENABLED */
127
125
  #endif /* __XML_C14N_H__ */
128
126
 
@@ -13,6 +13,7 @@
13
13
 
14
14
  #include <stddef.h>
15
15
  #include <libxml/xmlversion.h>
16
+ #include <libxml/xmlstring.h>
16
17
 
17
18
  #ifdef __cplusplus
18
19
  extern "C" {
@@ -32,6 +32,15 @@
32
32
  extern "C" {
33
33
  #endif
34
34
 
35
+ typedef enum {
36
+ XML_ENC_ERR_SUCCESS = 0,
37
+ XML_ENC_ERR_SPACE = -1,
38
+ XML_ENC_ERR_INPUT = -2,
39
+ XML_ENC_ERR_PARTIAL = -3,
40
+ XML_ENC_ERR_INTERNAL = -4,
41
+ XML_ENC_ERR_MEMORY = -5
42
+ } xmlCharEncError;
43
+
35
44
  /*
36
45
  * xmlCharEncoding:
37
46
  *
@@ -142,14 +151,6 @@ struct _xmlCharEncodingHandler {
142
151
  #endif /* LIBXML_ICU_ENABLED */
143
152
  };
144
153
 
145
- #ifdef __cplusplus
146
- }
147
- #endif
148
- #include <libxml/tree.h>
149
- #ifdef __cplusplus
150
- extern "C" {
151
- #endif
152
-
153
154
  /*
154
155
  * Interfaces for encoding handlers.
155
156
  */
@@ -194,20 +195,21 @@ XMLPUBFUN xmlCharEncoding
194
195
  xmlDetectCharEncoding (const unsigned char *in,
195
196
  int len);
196
197
 
198
+ struct _xmlBuffer;
197
199
  XMLPUBFUN int
198
200
  xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
199
- xmlBufferPtr out,
200
- xmlBufferPtr in);
201
+ struct _xmlBuffer *out,
202
+ struct _xmlBuffer *in);
201
203
 
202
204
  XMLPUBFUN int
203
205
  xmlCharEncInFunc (xmlCharEncodingHandler *handler,
204
- xmlBufferPtr out,
205
- xmlBufferPtr in);
206
+ struct _xmlBuffer *out,
207
+ struct _xmlBuffer *in);
206
208
  XML_DEPRECATED
207
209
  XMLPUBFUN int
208
210
  xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
209
- xmlBufferPtr out,
210
- xmlBufferPtr in);
211
+ struct _xmlBuffer *out,
212
+ struct _xmlBuffer *in);
211
213
  XMLPUBFUN int
212
214
  xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
213
215
 
@@ -12,7 +12,9 @@
12
12
  #define __XML_ENTITIES_H__
13
13
 
14
14
  #include <libxml/xmlversion.h>
15
+ #define XML_TREE_INTERNALS
15
16
  #include <libxml/tree.h>
17
+ #undef XML_TREE_INTERNALS
16
18
 
17
19
  #ifdef __cplusplus
18
20
  extern "C" {
@@ -85,6 +87,8 @@ XMLPUBFUN xmlEntityPtr
85
87
  const xmlChar *ExternalID,
86
88
  const xmlChar *SystemID,
87
89
  const xmlChar *content);
90
+ XMLPUBFUN void
91
+ xmlFreeEntity (xmlEntityPtr entity);
88
92
  XMLPUBFUN xmlEntityPtr
89
93
  xmlAddDocEntity (xmlDocPtr doc,
90
94
  const xmlChar *name,