From 583a472523a8698f0a5ec83e744c56781ed8b647 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Fri, 24 Feb 2023 22:21:25 +0100 Subject: [PATCH 01/15] Next verison --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6126e708c..84b2cd58e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 0.18.0 (unreleased) + + ## 0.17.1 (2023-02-24) - Fix bugs with colocated directories in the root `content` directory From 961397325ee5ad813eabae3254b49164ee09998f Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 6 Mar 2023 22:25:27 +0100 Subject: [PATCH 02/15] Fix a page missing from e2e test --- test_site/content/posts/skip_prefixes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/test_site/content/posts/skip_prefixes.md b/test_site/content/posts/skip_prefixes.md index 49f1ac301c..5d4a089bc5 100644 --- a/test_site/content/posts/skip_prefixes.md +++ b/test_site/content/posts/skip_prefixes.md @@ -1,4 +1,5 @@ +++ +date = 2017-01-01 +++ [test skip 1](http://invaliddomain Date: Wed, 8 Mar 2023 22:31:48 +0100 Subject: [PATCH 03/15] Fix index errors (#2129) * consider sections by path instead of by component * add tests * update more tests --- components/site/src/lib.rs | 6 +++--- components/site/tests/site.rs | 12 ++++++------ test_site/content/2018/index.md | 3 +++ .../colocated-assets/with_subfolder/_index.md | 3 +++ 4 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 test_site/content/2018/index.md create mode 100644 test_site/content/colocated-assets/with_subfolder/_index.md diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index df62ae9ed3..b40e0b5c76 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -183,7 +183,7 @@ impl Site { // at the end to detect pages that are actually errors: // when there is both a _index.md and index.md in the same folder let mut pages = Vec::new(); - let mut components = HashSet::new(); + let mut sections = HashSet::new(); loop { let entry: DirEntry = match dir_walker.next() { @@ -248,7 +248,7 @@ impl Site { for index_file in index_files { let section = Section::from_file(index_file.path(), &self.config, &self.base_path)?; - components.extend(section.file.components.clone()); + sections.insert(section.components.join("/")); // if the section is drafted we can skip the entire dir if section.meta.draft && !self.include_drafts { @@ -275,7 +275,7 @@ impl Site { // all the components there. if page.file.filename == "index.md" { let is_invalid = match page.components.last() { - Some(last) => components.contains(last), + Some(_) => sections.contains(&page.components.join("/")), // content/index.md is always invalid, but content/colocated/index.md is ok None => page.file.colocated_path.is_none(), }; diff --git a/components/site/tests/site.rs b/components/site/tests/site.rs index 64936124bc..e1a0f0df2b 100644 --- a/components/site/tests/site.rs +++ b/components/site/tests/site.rs @@ -21,7 +21,7 @@ fn can_parse_site() { let library = site.library.read().unwrap(); // Correct number of pages (sections do not count as pages, draft are ignored) - assert_eq!(library.pages.len(), 34); + assert_eq!(library.pages.len(), 35); let posts_path = path.join("content").join("posts"); // Make sure the page with a url doesn't have any sections @@ -34,12 +34,12 @@ fn can_parse_site() { assert_eq!(asset_folder_post.file.components, vec!["posts".to_string()]); // That we have the right number of sections - assert_eq!(library.sections.len(), 12); + assert_eq!(library.sections.len(), 13); // And that the sections are correct let index_section = library.sections.get(&path.join("content").join("_index.md")).unwrap(); assert_eq!(index_section.subsections.len(), 5); - assert_eq!(index_section.pages.len(), 4); + assert_eq!(index_section.pages.len(), 5); assert!(index_section.ancestors.is_empty()); let posts_section = library.sections.get(&posts_path.join("_index.md")).unwrap(); @@ -279,7 +279,7 @@ fn can_build_site_with_live_reload_and_drafts() { // drafted sections are included let library = site.library.read().unwrap(); - assert_eq!(library.sections.len(), 14); + assert_eq!(library.sections.len(), 15); assert!(file_exists!(public, "secret_section/index.html")); assert!(file_exists!(public, "secret_section/draft-page/index.html")); @@ -545,13 +545,13 @@ fn can_build_site_with_pagination_for_index() { "page/1/index.html", "Click here" )); - assert!(file_contains!(public, "index.html", "Num pages: 2")); + assert!(file_contains!(public, "index.html", "Num pages: 3")); assert!(file_contains!(public, "index.html", "Current index: 1")); assert!(file_contains!(public, "index.html", "First: https://replace-this-with-your-url.com/")); assert!(file_contains!( public, "index.html", - "Last: https://replace-this-with-your-url.com/page/2/" + "Last: https://replace-this-with-your-url.com/page/3/" )); assert!(!file_contains!(public, "index.html", "has_prev")); assert!(file_contains!(public, "index.html", "has_next")); diff --git a/test_site/content/2018/index.md b/test_site/content/2018/index.md new file mode 100644 index 0000000000..6153c05072 --- /dev/null +++ b/test_site/content/2018/index.md @@ -0,0 +1,3 @@ ++++ +title = "index page in a direction with the same name as a section" ++++ \ No newline at end of file diff --git a/test_site/content/colocated-assets/with_subfolder/_index.md b/test_site/content/colocated-assets/with_subfolder/_index.md new file mode 100644 index 0000000000..528f72b72b --- /dev/null +++ b/test_site/content/colocated-assets/with_subfolder/_index.md @@ -0,0 +1,3 @@ ++++ +title = "Assets in root content directory" ++++ \ No newline at end of file From f6c0d52d16ce23516107f481e97c2d580b1c6f0a Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Wed, 8 Mar 2023 22:32:05 +0100 Subject: [PATCH 04/15] Revert "Allow external links to start with "www.*" (#2100)" This reverts commit 902fd3a9fb58e52085110b2f8e0ec9c282d8b2a2. --- components/markdown/src/markdown.rs | 1 - components/utils/src/net.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/components/markdown/src/markdown.rs b/components/markdown/src/markdown.rs index 4677cc9303..d773a21f1f 100644 --- a/components/markdown/src/markdown.rs +++ b/components/markdown/src/markdown.rs @@ -593,7 +593,6 @@ mod tests { fn test_is_external_link() { assert!(is_external_link("http://example.com/")); assert!(is_external_link("https://example.com/")); - assert!(is_external_link("www.example.com")); assert!(is_external_link("https://example.com/index.html#introduction")); assert!(!is_external_link("mailto:user@example.com")); diff --git a/components/utils/src/net.rs b/components/utils/src/net.rs index 61deeae363..9f662e8526 100644 --- a/components/utils/src/net.rs +++ b/components/utils/src/net.rs @@ -10,7 +10,7 @@ pub fn port_is_available(port: u16) -> bool { TcpListener::bind(("127.0.0.1", port)).is_ok() } -/// Returns whether a link starts with an HTTP(s) scheme or "www.". +/// Returns whether a link starts with an HTTP(s) scheme. pub fn is_external_link(link: &str) -> bool { - link.starts_with("http:") || link.starts_with("https:") || link.starts_with("www.") + link.starts_with("http:") || link.starts_with("https:") } From 8611318324b367600026b14e8873d2606c254f2a Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Wed, 8 Mar 2023 22:48:27 +0100 Subject: [PATCH 05/15] Update changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84b2cd58e9..27c8ebc6b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,10 @@ # Changelog -## 0.18.0 (unreleased) +## 0.17.2 (unreleased) +- Fix one more invalid error with colocated directories +- Revert "Recognize links starting with `www` as external for the link checker" as they won't be external links in practice +- ## 0.17.1 (2023-02-24) From deaaa1601768feb330974e655b56eef51da4dd24 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Wed, 8 Mar 2023 23:03:04 +0100 Subject: [PATCH 06/15] Fix tests --- components/site/tests/site.rs | 2 +- test_site/content/posts/ignored.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/site/tests/site.rs b/components/site/tests/site.rs index e1a0f0df2b..2c6d3c46bb 100644 --- a/components/site/tests/site.rs +++ b/components/site/tests/site.rs @@ -44,7 +44,7 @@ fn can_parse_site() { let posts_section = library.sections.get(&posts_path.join("_index.md")).unwrap(); assert_eq!(posts_section.subsections.len(), 2); - assert_eq!(posts_section.pages.len(), 9); // 10 with 1 draft == 9 + assert_eq!(posts_section.pages.len(), 10); // 11 with 1 draft == 10 assert_eq!(posts_section.ancestors, vec![index_section.file.relative.clone()]); // Make sure we remove all the pwd + content from the sections diff --git a/test_site/content/posts/ignored.md b/test_site/content/posts/ignored.md index 54e0556a73..136b63cf33 100644 --- a/test_site/content/posts/ignored.md +++ b/test_site/content/posts/ignored.md @@ -3,4 +3,4 @@ title = "This should not be picked up" date = 2019-07-23 +++ -Don't pick me up. +Don't pick me up, I'm ignored via ignored_content in config.toml. From b7fec4d31afbf2df6a1a95c4e0db2a152e0dd59a Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 13 Mar 2023 22:38:27 +0100 Subject: [PATCH 07/15] Remove dummy test --- components/imageproc/src/meta.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/components/imageproc/src/meta.rs b/components/imageproc/src/meta.rs index f00741cbab..a619e97d28 100644 --- a/components/imageproc/src/meta.rs +++ b/components/imageproc/src/meta.rs @@ -76,14 +76,3 @@ pub fn read_image_metadata>(path: P) -> Result _ => ImageMeta::read(path).map(ImageMetaResponse::from).with_context(err_context), } } - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn can_get_webp_metadata() { - let filepath = Path::new("tests/test_imgs/webp.webp"); - assert!(filepath.exists()); - } -} From 3186d4b47434f48166b17038a0415a4bde512a50 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 13 Mar 2023 22:44:07 +0100 Subject: [PATCH 08/15] Update deps --- Cargo.lock | 383 ++++++++++++++++++++++++++--------------------------- Cargo.toml | 2 +- 2 files changed, 187 insertions(+), 198 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d3424c3ac1..5e9f1bd526 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -130,9 +130,9 @@ dependencies = [ [[package]] name = "bit_field" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb6dd1c2376d2e096796e234a70e17e94cc2d5d54ff8ce42b28cef1d0d359a4" +checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" [[package]] name = "bitflags" @@ -154,9 +154,9 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array 0.14.6", ] @@ -212,9 +212,9 @@ checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" [[package]] name = "bytemuck" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041d3eab048880cb0b86b256447da3f18859a163c3b8d8893f4e6368abe6393" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" [[package]] name = "byteorder" @@ -240,9 +240,9 @@ checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "camino" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6031a462f977dd38968b6f23378356512feeace69cef817e1a4475108093cec3" +checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" dependencies = [ "serde", ] @@ -301,9 +301,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" dependencies = [ "iana-time-zone", "num-integer", @@ -314,24 +314,24 @@ dependencies = [ [[package]] name = "chrono-tz" -version = "0.6.3" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c39203181991a7dd4343b8005bd804e7a9a37afb8ac070e43771e8c820bbde" +checksum = "58549f1842da3080ce63002102d5bc954c7bc843d4f47818e642abdc36253552" dependencies = [ "chrono", "chrono-tz-build", - "phf 0.11.1", + "phf 0.10.1", ] [[package]] name = "chrono-tz-build" -version = "0.0.3" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f509c3a87b33437b05e2458750a0700e5bdd6956176773e6c7d6dd15a283a0c" +checksum = "db058d493fb2f65f41861bfed7e3fe6335264a9f0f92710cab5bdf01fef09069" dependencies = [ "parse-zoneinfo", - "phf 0.11.1", - "phf_codegen 0.11.1", + "phf 0.10.1", + "phf_codegen 0.10.0", ] [[package]] @@ -353,12 +353,12 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.6" +version = "4.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0b0588d44d4d63a87dbd75c136c166bbfd9a86a31cb89e09906521c7d3f5e3" +checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5" dependencies = [ "bitflags", - "clap_derive 4.1.0", + "clap_derive 4.1.8", "clap_lex 0.3.2", "is-terminal", "once_cell", @@ -368,11 +368,11 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.1.3" +version = "4.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0012995dc3a54314f4710f5631d74767e73c534b8757221708303e48eef7a19b" +checksum = "501ff0a401473ea1d4c3b125ff95506b62c5bc5768d818634195fbb7c4ad5ff4" dependencies = [ - "clap 4.1.6", + "clap 4.1.8", ] [[package]] @@ -390,9 +390,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.1.0" +version = "4.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8" +checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0" dependencies = [ "heck", "proc-macro-error", @@ -548,9 +548,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -558,9 +558,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", @@ -569,9 +569,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.13" +version = "0.9.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" +checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" dependencies = [ "autocfg", "cfg-if 1.0.0", @@ -582,9 +582,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ "cfg-if 1.0.0", ] @@ -618,9 +618,9 @@ dependencies = [ [[package]] name = "csv" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af91f40b7355f82b0a891f50e70399475945bb0b0da4f1700ce60761c9d3e359" +checksum = "0b015497079b9a9d69c02ad25de6c0a6edef051ea6360a327d0bd05802ef64ad" dependencies = [ "csv-core", "itoa", @@ -649,9 +649,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.91" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d3488e7665a7a483b57e25bdd90d0aeb2bc7608c8d0346acf2ad3f1caf1d62" +checksum = "9a140f260e6f3f79013b8bfc65e7ce630c9ab4388c6a89c71e07226f49487b72" dependencies = [ "cc", "cxxbridge-flags", @@ -661,9 +661,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.91" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48fcaf066a053a41a81dfb14d57d99738b767febb8b735c3016e469fac5da690" +checksum = "da6383f459341ea689374bf0a42979739dc421874f112ff26f829b8040b8e613" dependencies = [ "cc", "codespan-reporting", @@ -676,15 +676,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.91" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef98b8b717a829ca5603af80e1f9e2e48013ab227b68ef37872ef84ee479bf" +checksum = "90201c1a650e95ccff1c8c0bb5a343213bdd317c6e600a93075bca2eff54ec97" [[package]] name = "cxxbridge-macro" -version = "1.0.91" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "086c685979a698443656e5cf7856c95c642295a38599f12fb1ff76fb28d19892" +checksum = "0b75aed41bb2e6367cae39e6326ef817a851db13c13e4f3263714ca3cfb8de56" dependencies = [ "proc-macro2", "quote", @@ -725,7 +725,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.3", + "block-buffer 0.10.4", "crypto-common", ] @@ -899,17 +899,17 @@ dependencies = [ [[package]] name = "exr" -version = "1.5.3" +version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8af5ef47e2ed89d23d0ecbc1b681b30390069de70260937877514377fc24feb" +checksum = "bdd2162b720141a91a054640662d3edce3d50a944a50ffca5313cd951abb35b4" dependencies = [ "bit_field", "flume", "half", "lebe", "miniz_oxide", + "rayon-core", "smallvec", - "threadpool", "zune-inflate", ] @@ -960,7 +960,7 @@ dependencies = [ "futures-sink", "nanorand", "pin-project", - "spin 0.9.5", + "spin 0.9.6", ] [[package]] @@ -1040,42 +1040,42 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" +checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" [[package]] name = "futures-io" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" +checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" [[package]] name = "futures-sink" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" +checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" [[package]] name = "futures-task" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" +checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" [[package]] name = "futures-util" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" dependencies = [ "futures-core", "futures-io", @@ -1213,9 +1213,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" dependencies = [ "bytes 1.4.0", "fnv", @@ -1334,9 +1334,12 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "humansize" -version = "1.1.1" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02296996cb8796d7c6e3bc2d9211b7802812d36999a51bb754123ead7d37d026" +checksum = "6cb51c9a029ddc91b07a787f1d86b53ccfa49b0e86688c946ebe8d3555685dd7" +dependencies = [ + "libm", +] [[package]] name = "humantime" @@ -1346,9 +1349,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.24" +version = "0.14.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" +checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" dependencies = [ "bytes 1.4.0", "futures-channel", @@ -1531,9 +1534,9 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" +checksum = "cfa919a82ea574332e2de6e74b4c36e74d41982b335080fa59d4ef31be20fdf3" dependencies = [ "libc", "windows-sys 0.45.0", @@ -1568,9 +1571,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "jieba-rs" @@ -1589,9 +1592,9 @@ dependencies = [ [[package]] name = "jobserver" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" dependencies = [ "libc", ] @@ -1684,9 +1687,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.139" +version = "0.2.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" + +[[package]] +name = "libm" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" [[package]] name = "libs" @@ -1725,7 +1734,7 @@ dependencies = [ "tera", "termcolor", "time", - "toml 0.7.2", + "toml 0.7.3", "unic-langid", "unicode-segmentation", "url", @@ -2018,9 +2027,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ "autocfg", ] @@ -2414,12 +2423,11 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "open" -version = "3.2.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2078c0039e6a54a0c42c28faa984e115fb4c2d5bf2208f77d1961002df8576f8" +checksum = "21ecf2487e799604735754d2c5896106785987b441b5aee58f242e4d4963179a" dependencies = [ "pathdiff", - "windows-sys 0.42.0", ] [[package]] @@ -2536,9 +2544,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.5.5" +version = "2.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028accff104c4e513bad663bbcd2ad7cfd5304144404c31ed0a77ac103d00660" +checksum = "8cbd939b234e95d72bc393d51788aec68aeeb5d51e748ca08ff3aad58cb722f7" dependencies = [ "thiserror", "ucd-trie", @@ -2546,9 +2554,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.5.5" +version = "2.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ac3922aac69a40733080f53c1ce7f91dcf57e1a5f6c52f421fadec7fbdc4b69" +checksum = "a81186863f3d0a27340815be8f2078dd8050b14cd71913db9fbda795e5f707d7" dependencies = [ "pest", "pest_generator", @@ -2556,9 +2564,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.5.5" +version = "2.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06646e185566b5961b4058dd107e0a7f56e77c3f484549fb119867773c0f202" +checksum = "75a1ef20bf3193c15ac345acb32e26b3dc3223aff4d77ae4fc5359567683796b" dependencies = [ "pest", "pest_meta", @@ -2569,9 +2577,9 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.5.5" +version = "2.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6f60b2ba541577e2a0c307c8f39d1439108120eb7903adeb6497fa880c59616" +checksum = "5e3b284b1f13a20dc5ebc90aff59a51b8d7137c221131b52a7260c08cbc1cc80" dependencies = [ "once_cell", "pest", @@ -2659,6 +2667,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ "siphasher", + "uncased", ] [[package]] @@ -2668,7 +2677,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676" dependencies = [ "siphasher", - "uncased", ] [[package]] @@ -2711,14 +2719,14 @@ checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "plist" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9469799ca90293a376f68f6fcb8f11990d9cff55602cfba0ba83893c973a7f46" +checksum = "ffac6a51110e97610dd3ac73e34a65b27e56a1e305df41bad1f616d8e1cb22f4" dependencies = [ "base64", "indexmap", "line-wrap", - "quick-xml 0.26.0", + "quick-xml 0.27.1", "serde", "time", ] @@ -2779,9 +2787,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" dependencies = [ "unicode-ident", ] @@ -2820,9 +2828,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.26.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd" +checksum = "ffc053f057dd768a56f62cd7e434c42c831d296968997e9ac1f76ea7c2d14c41" dependencies = [ "memchr", ] @@ -2841,9 +2849,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.23" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -2921,9 +2929,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ "either", "rayon-core", @@ -2931,9 +2939,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.10.2" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -2969,18 +2977,9 @@ checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "relative-path" -version = "1.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3bf6b372449361333ac1f498b7edae4dd5e70dccd7c0c2a7c7bce8f05ede648" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi 0.3.9", -] +checksum = "4bf2521270932c3c7bed1a59151222bd7643c79310f2916f01925e1e16255698" [[package]] name = "reqwest" @@ -3075,9 +3074,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.8" +version = "0.36.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" +checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc" dependencies = [ "bitflags", "errno", @@ -3110,9 +3109,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "safemem" @@ -3152,9 +3151,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scratch" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" +checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" [[package]] name = "sct" @@ -3201,27 +3200,27 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.152" +version = "1.0.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "71f2b4817415c6d4210bfe1c7bfcf4801b2d904cb4d0e1a8fdb651013c9e86b8" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "d071a94a3fac4aff69d023a7f411e33f40f3483f8c5190b1953822b6b76d7630" dependencies = [ "proc-macro2", "quote", @@ -3230,9 +3229,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" +checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" dependencies = [ "indexmap", "itoa", @@ -3263,9 +3262,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.17" +version = "0.9.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb06d4b6cdaef0e0c51fa881acb721bed3c924cfaa71d9c94a3b771dfdf6567" +checksum = "f82e6c8c047aa50a7328632d067bcae6ef38772a79e28daf32f735e0e4f3dd10" dependencies = [ "indexmap", "itoa", @@ -3375,9 +3374,9 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi 0.3.9", @@ -3391,9 +3390,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dccf47db1b41fa1573ed27ccf5e08e3ca771cb994f776668c5ebda893b248fc" +checksum = "b5d6e0250b93c8427a177b849d144a96d5acc57006149479403d7861ab721e34" dependencies = [ "lock_api", ] @@ -3406,9 +3405,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "string_cache" -version = "0.8.4" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213494b7a2b503146286049378ce02b482200519accc31872ee8be91fa820a08" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", @@ -3496,16 +3495,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" dependencies = [ "cfg-if 1.0.0", "fastrand", - "libc", "redox_syscall", - "remove_dir_all", - "winapi 0.3.9", + "rustix", + "windows-sys 0.42.0", ] [[package]] @@ -3536,9 +3534,9 @@ dependencies = [ [[package]] name = "tera" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3df578c295f9ec044ff1c829daf31bb7581d5b3c2a7a3d87419afe1f2531438c" +checksum = "27df4164dd125228af4c90c9799a29740e39151767d579f3fc711491054a0378" dependencies = [ "chrono", "chrono-tz", @@ -3553,6 +3551,7 @@ dependencies = [ "serde", "serde_json", "slug", + "thread_local", "unic-segment", ] @@ -3608,18 +3607,18 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e" dependencies = [ "proc-macro2", "quote", @@ -3628,23 +3627,13 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" dependencies = [ - "cfg-if 1.0.0", "once_cell", ] -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - [[package]] name = "tiff" version = "0.8.1" @@ -3658,9 +3647,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53250a3b3fed8ff8fd988587d8925d26a83ac3845d9e03b220b37f34c2b8d6c2" +checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" dependencies = [ "itoa", "libc", @@ -3678,9 +3667,9 @@ checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" [[package]] name = "time-macros" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a460aeb8de6dcb0f381e1ee05f1cd56fcf5a5f6eb8187ff3d8f0b11078d38b7c" +checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" dependencies = [ "time-core", ] @@ -3711,9 +3700,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.25.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" +checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" dependencies = [ "autocfg", "bytes 1.4.0", @@ -3723,7 +3712,7 @@ dependencies = [ "num_cpus", "pin-project-lite", "socket2", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -3772,9 +3761,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7afcae9e3f0fe2c370fd4657108972cbb2fa9db1b9f84849cefd80741b01cb6" +checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21" dependencies = [ "serde", "serde_spanned", @@ -3793,9 +3782,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.4" +version = "0.19.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1eb0622d28f4b9c90adc4ea4b2b46b47663fde9ac5fafcb14a1369d5508825" +checksum = "08de71aa0d6e348f070457f85af8bd566e2bc452156a423ddf22861b3a953fae" dependencies = [ "indexmap", "serde", @@ -3936,15 +3925,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" +checksum = "524b68aca1d05e03fdf03fcdce2c6c94b6daf6d16861ddaa7e4f2b6638a9052c" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" @@ -3969,9 +3958,9 @@ checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "unsafe-libyaml" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc7ed8ba44ca06be78ea1ad2c3682a43349126c8818054231ee6f4748012aed2" +checksum = "ad2024452afd3874bf539695e04af6732ba06517424dbf958fdb16a01f3bef6c" [[package]] name = "untrusted" @@ -4231,9 +4220,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -4246,51 +4235,51 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "winnow" -version = "0.3.2" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c06e7dbfe731192c512aa707249279d720876a868eb08f21ea93eb9de1eca9" +checksum = "ee7b2c67f962bf5042bfd8b6a916178df33a26eec343ae064cb8e069f638fa6f" dependencies = [ "memchr", ] @@ -4373,9 +4362,9 @@ dependencies = [ [[package]] name = "zola" -version = "0.17.1" +version = "0.17.2" dependencies = [ - "clap 4.1.6", + "clap 4.1.8", "clap_complete", "console 0.1.0", "ctrlc", @@ -4398,9 +4387,9 @@ dependencies = [ [[package]] name = "zune-inflate" -version = "0.2.50" +version = "0.2.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589245df6230839c305984dcc0a8385cc72af1fd223f360ffd5d65efa4216d40" +checksum = "a01728b79fb9b7e28a8c11f715e1cd8dc2cda7416a007d66cac55cebb3a8ac6b" dependencies = [ "simd-adler32", ] diff --git a/Cargo.toml b/Cargo.toml index c460c4393c..b105852674 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zola" -version = "0.17.1" +version = "0.17.2" authors = ["Vincent Prouillet "] edition = "2018" license = "MIT" From 0ba2707316068ad15e2b917b6938b480f49fb44a Mon Sep 17 00:00:00 2001 From: Icy Defiance Date: Wed, 15 Mar 2023 05:12:59 -0400 Subject: [PATCH 09/15] Use page.summary if available (#2141) --- components/templates/src/builtins/atom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/templates/src/builtins/atom.xml b/components/templates/src/builtins/atom.xml index acdd6b2e39..8b2d331e5c 100644 --- a/components/templates/src/builtins/atom.xml +++ b/components/templates/src/builtins/atom.xml @@ -37,7 +37,11 @@ {{ page.permalink | safe }} + {% if page.summary %} + {{ page.summary }} + {% else %} {{ page.content }} + {% endif %} {%- endfor %} From f6d27cd53854135a4a7393e7dfbf6672e71cccd9 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Wed, 15 Mar 2023 20:23:40 +0100 Subject: [PATCH 10/15] Update changelog --- CHANGELOG.md | 2 +- Cargo.lock | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27c8ebc6b9..b6d639dcb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - Fix one more invalid error with colocated directories - Revert "Recognize links starting with `www` as external for the link checker" as they won't be external links in practice -- +- Use page.summary for atom.xml if available ## 0.17.1 (2023-02-24) diff --git a/Cargo.lock b/Cargo.lock index 5e9f1bd526..ebbfb6efb8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2432,9 +2432,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.45" +version = "0.10.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" +checksum = "fd2523381e46256e40930512c7fd25562b9eae4812cb52078f155e87217c9d1e" dependencies = [ "bitflags", "cfg-if 1.0.0", @@ -2464,9 +2464,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.80" +version = "0.9.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" +checksum = "176be2629957c157240f68f61f2d0053ad3a4ecfdd9ebf1e6521d18d9635cf67" dependencies = [ "autocfg", "cc", @@ -3209,18 +3209,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.155" +version = "1.0.156" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71f2b4817415c6d4210bfe1c7bfcf4801b2d904cb4d0e1a8fdb651013c9e86b8" +checksum = "314b5b092c0ade17c00142951e50ced110ec27cea304b1037c6969246c2469a4" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.155" +version = "1.0.156" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d071a94a3fac4aff69d023a7f411e33f40f3483f8c5190b1953822b6b76d7630" +checksum = "d7e29c4601e36bcec74a223228dce795f4cd3616341a4af93520ca1a837c087d" dependencies = [ "proc-macro2", "quote", @@ -3298,9 +3298,9 @@ dependencies = [ [[package]] name = "simd-adler32" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14a5df39617d7c8558154693a1bb8157a4aab8179209540cc0b10e5dc24e0b18" +checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f" [[package]] name = "similar" @@ -3534,9 +3534,9 @@ dependencies = [ [[package]] name = "tera" -version = "1.18.0" +version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27df4164dd125228af4c90c9799a29740e39151767d579f3fc711491054a0378" +checksum = "95a665751302f22a03c56721e23094e4dc22b04a80f381e6737a07bf7a7c70c0" dependencies = [ "chrono", "chrono-tz", @@ -3782,9 +3782,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.6" +version = "0.19.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08de71aa0d6e348f070457f85af8bd566e2bc452156a423ddf22861b3a953fae" +checksum = "dc18466501acd8ac6a3f615dd29a3438f8ca6bb3b19537138b3106e575621274" dependencies = [ "indexmap", "serde", @@ -4277,9 +4277,9 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "winnow" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee7b2c67f962bf5042bfd8b6a916178df33a26eec343ae064cb8e069f638fa6f" +checksum = "23d020b441f92996c80d94ae9166e8501e59c7bb56121189dc9eab3bd8216966" dependencies = [ "memchr", ] From f0cd47ffc6fa5448e2c405b73c9872ea80396053 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Wed, 15 Mar 2023 20:41:36 +0100 Subject: [PATCH 11/15] Fix tests --- test_sites_invalid/indexmd/static/.gitkeep | 0 test_sites_invalid/indexmd/templates/.gitkeep | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 test_sites_invalid/indexmd/static/.gitkeep create mode 100644 test_sites_invalid/indexmd/templates/.gitkeep diff --git a/test_sites_invalid/indexmd/static/.gitkeep b/test_sites_invalid/indexmd/static/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test_sites_invalid/indexmd/templates/.gitkeep b/test_sites_invalid/indexmd/templates/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 From a4a85fe202156eaaca9a65a5715e443c63c8c2a2 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Thu, 16 Mar 2023 21:53:49 +0100 Subject: [PATCH 12/15] Fix cachebusting not working with binary files Closes #2142 --- CHANGELOG.md | 1 + components/templates/src/global_fns/files.rs | 38 ++++++++++++-------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6d639dcb4..4f25540651 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Fix one more invalid error with colocated directories - Revert "Recognize links starting with `www` as external for the link checker" as they won't be external links in practice - Use page.summary for atom.xml if available +- Fix cachebusting not working with binary files ## 0.17.1 (2023-02-24) diff --git a/components/templates/src/global_fns/files.rs b/components/templates/src/global_fns/files.rs index cc8c1a9409..2fd9678a28 100644 --- a/components/templates/src/global_fns/files.rs +++ b/components/templates/src/global_fns/files.rs @@ -11,13 +11,13 @@ use libs::sha2::{digest, Sha256, Sha384, Sha512}; use libs::tera::{from_value, to_value, Function as TeraFn, Result, Value}; use utils::site::resolve_internal_link; -fn compute_hash(literal: String, as_base64: bool) -> String +fn compute_hash(data: &[u8], as_base64: bool) -> String where digest::Output: core::fmt::LowerHex, D: std::io::Write, { let mut hasher = D::new(); - hasher.update(literal); + hasher.update(data); if as_base64 { standard_b64.encode(hasher.finalize()) } else { @@ -127,11 +127,9 @@ impl TeraFn for GetUrl { .map_err(|e| format!("`get_url`: {}", e))? .and_then(|(p, _)| fs::File::open(p).ok()) .and_then(|mut f| { - let mut contents = String::new(); - - f.read_to_string(&mut contents).ok()?; - - Some(compute_hash::(contents, false)) + let mut contents = Vec::new(); + f.read_to_end(&mut contents).ok()?; + Some(compute_hash::(&contents, false)) }) { Some(hash) => { let shorthash = &hash[..20]; // 2^-80 chance of false positive @@ -202,16 +200,16 @@ impl TeraFn for GetHash { } }; - let mut f = match std::fs::File::open(file_path) { + let mut f = match fs::File::open(file_path) { Ok(f) => f, Err(e) => { return Err(format!("File {} could not be open: {}", path_v, e).into()); } }; - let mut contents = String::new(); + let mut contents = Vec::new(); - match f.read_to_string(&mut contents) { + match f.read_to_end(&mut contents) { Ok(f) => f, Err(e) => { return Err(format!("File {} could not be read: {}", path_v, e).into()); @@ -220,7 +218,7 @@ impl TeraFn for GetHash { contents } - (None, Some(literal_v)) => literal_v, + (None, Some(literal_v)) => literal_v.into_bytes(), }; let sha_type = optional_arg!( @@ -235,9 +233,9 @@ impl TeraFn for GetHash { .unwrap_or(true); let hash = match sha_type { - 256 => compute_hash::(contents, base64), - 384 => compute_hash::(contents, base64), - 512 => compute_hash::(contents, base64), + 256 => compute_hash::(&contents, base64), + 384 => compute_hash::(&contents, base64), + 512 => compute_hash::(&contents, base64), _ => return Err("`get_hash`: Invalid sha value".into()), }; @@ -250,7 +248,7 @@ mod tests { use super::{GetHash, GetUrl}; use std::collections::HashMap; - use std::fs::create_dir; + use std::fs::{copy, create_dir}; use std::path::PathBuf; use libs::tera::{to_value, Function}; @@ -293,6 +291,16 @@ title = "A title" static_fn.call(&args).unwrap(), "http://a-website.com/app.css?h=572e691dc68c3fcd653a" ); + + // And binary files as well + copy("gutenberg.jpg", dir.path().join("gutenberg.jpg")).unwrap(); + let mut args = HashMap::new(); + args.insert("path".to_string(), to_value("gutenberg.jpg").unwrap()); + args.insert("cachebust".to_string(), to_value(true).unwrap()); + assert_eq!( + static_fn.call(&args).unwrap(), + "http://a-website.com/gutenberg.jpg?h=93fff9d0ecde9b119c0c" + ); } #[test] From d52a071c053443efbbfc46782dae8eafd1f77236 Mon Sep 17 00:00:00 2001 From: Justin Tennant Date: Fri, 17 Mar 2023 12:47:03 -0700 Subject: [PATCH 13/15] Implement Default for LanguageOptions (#2145) Closes #2137 --- components/config/src/config/languages.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/components/config/src/config/languages.rs b/components/config/src/config/languages.rs index acc0db6af9..3c863799b6 100644 --- a/components/config/src/config/languages.rs +++ b/components/config/src/config/languages.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; use crate::config::search; use crate::config::taxonomies; -#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] #[serde(default)] pub struct LanguageOptions { /// Title of the site. Defaults to None @@ -96,6 +96,21 @@ impl LanguageOptions { } } +impl Default for LanguageOptions { + fn default() -> LanguageOptions { + LanguageOptions { + title: None, + description: None, + generate_feed: false, + feed_filename: "atom.xml".to_string(), + taxonomies: vec![], + build_search_index: false, + search: search::Search::default(), + translations: HashMap::new(), + } + } +} + /// We want to ensure the language codes are valid ones pub fn validate_code(code: &str) -> Result<()> { if LanguageIdentifier::from_bytes(code.as_bytes()).is_err() { From c0732a27089fdacafb5b65172e330b329f222849 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Sun, 19 Mar 2023 20:06:20 +0100 Subject: [PATCH 14/15] Update changelog and disable clippy in CI for a bit --- CHANGELOG.md | 1 + azure-pipelines.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f25540651..cef4b0696d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Revert "Recognize links starting with `www` as external for the link checker" as they won't be external links in practice - Use page.summary for atom.xml if available - Fix cachebusting not working with binary files +- Fix warning message for multilingual sites ## 0.17.1 (2023-02-24) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b88e90db40..414f6f1010 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -44,8 +44,8 @@ stages: displayName: Cargo test - script: cargo fmt --check displayName: Cargo fmt - - script: cargo clippy --workspace -- -Dwarnings - displayName: Cargo clippy +# - script: cargo clippy --workspace -- -Dwarnings +# displayName: Cargo clippy - stage: Release From 7c6bdc1019dbfa1c59667dd6ba0cacf30774b41b Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Sun, 19 Mar 2023 20:23:27 +0100 Subject: [PATCH 15/15] Set release date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cef4b0696d..fdb28810d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 0.17.2 (unreleased) +## 0.17.2 (2023-03-19) - Fix one more invalid error with colocated directories - Revert "Recognize links starting with `www` as external for the link checker" as they won't be external links in practice