From 1bee9c462f8439d8310ddd8160275533596927d2 Mon Sep 17 00:00:00 2001 From: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com> Date: Wed, 29 May 2024 22:46:46 -0400 Subject: [PATCH 1/3] Fix unmaintained audit warning for yaml-rust --- Cargo.toml | 4 ++-- src/parsing/yaml_load.rs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 62abe61..4ba56d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ exclude = [ ] [dependencies] -yaml-rust = { version = "0.4.5", optional = true } +yaml-rust2 = { version = "0.8", optional = true } onig = { version = "6.0", optional = true, default-features = false } fancy-regex = { version = "0.11", optional = true } walkdir = "2.0" @@ -69,7 +69,7 @@ html = ["parsing"] # Support for parsing .tmTheme files and .tmPreferences files plist-load = ["plist"] # Support for parsing .sublime-syntax files -yaml-load = ["yaml-rust", "parsing"] +yaml-load = ["yaml-rust2", "parsing"] default-onig = ["parsing", "default-syntaxes", "default-themes", "html", "plist-load", "yaml-load", "dump-load", "dump-create", "regex-onig"] # In order to switch to the fancy-regex engine, disable default features then add the default-fancy feature diff --git a/src/parsing/yaml_load.rs b/src/parsing/yaml_load.rs index 24f32a2..6e33295 100644 --- a/src/parsing/yaml_load.rs +++ b/src/parsing/yaml_load.rs @@ -5,8 +5,7 @@ use std::collections::HashMap; use std::error::Error; use std::ops::DerefMut; use std::path::Path; -use yaml_rust::yaml::Hash; -use yaml_rust::{ScanError, Yaml, YamlLoader}; +use yaml_rust2::{ScanError, Yaml, YamlLoader, yaml::Hash}; #[derive(Debug, thiserror::Error)] #[non_exhaustive] From 223ad020c08732ba1259bb8250033c570425e41d Mon Sep 17 00:00:00 2001 From: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com> Date: Fri, 31 May 2024 15:43:29 -0400 Subject: [PATCH 2/3] Update yaml-rust2 dep --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 4ba56d1..a570175 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ exclude = [ ] [dependencies] -yaml-rust2 = { version = "0.8", optional = true } +yaml-rust2 = { version = "0.8", optional = true, default_features = false } onig = { version = "6.0", optional = true, default-features = false } fancy-regex = { version = "0.11", optional = true } walkdir = "2.0" From bd05b87044e3b57369c5564fb3af5249bf5e8bb5 Mon Sep 17 00:00:00 2001 From: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com> Date: Fri, 31 May 2024 15:43:50 -0400 Subject: [PATCH 3/3] Run taplo fmt on Cargo.toml --- Cargo.toml | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a570175..d0aa800 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,15 +7,10 @@ keywords = ["syntax", "highlighting", "highlighter", "colouring", "parsing"] categories = ["parser-implementations", "parsing", "text-processing"] readme = "Readme.md" license = "MIT" -version = "5.2.0" # remember to update html_root_url +version = "5.2.0" # remember to update html_root_url authors = ["Tristan Hume "] edition = "2021" -exclude = [ - "testdata/*", - "/scripts/*", - "/Makefile", - "/codecov.yml" -] +exclude = ["testdata/*", "/scripts/*", "/Makefile", "/codecov.yml"] [dependencies] yaml-rust2 = { version = "0.8", optional = true, default_features = false } @@ -35,7 +30,7 @@ once_cell = "1.8" thiserror = "1.0" [dev-dependencies] -criterion = { version = "0.3", features = [ "html_reports" ] } +criterion = { version = "0.3", features = ["html_reports"] } rayon = "1.0.0" regex = "1.0" getopts = "0.2" @@ -71,9 +66,29 @@ plist-load = ["plist"] # Support for parsing .sublime-syntax files yaml-load = ["yaml-rust2", "parsing"] -default-onig = ["parsing", "default-syntaxes", "default-themes", "html", "plist-load", "yaml-load", "dump-load", "dump-create", "regex-onig"] +default-onig = [ + "parsing", + "default-syntaxes", + "default-themes", + "html", + "plist-load", + "yaml-load", + "dump-load", + "dump-create", + "regex-onig", +] # In order to switch to the fancy-regex engine, disable default features then add the default-fancy feature -default-fancy = ["parsing", "default-syntaxes", "default-themes", "html", "plist-load", "yaml-load", "dump-load", "dump-create", "regex-fancy"] +default-fancy = [ + "parsing", + "default-syntaxes", + "default-themes", + "html", + "plist-load", + "yaml-load", + "dump-load", + "dump-create", + "regex-fancy", +] default = ["default-onig"] # [profile.release]