From f3763c9d2ac4cd399ba8ea7afed492ae4dd6f2c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E9=9B=85=20misaki=20masa?= Date: Mon, 13 Jul 2026 01:36:23 +0800 Subject: [PATCH] Add changelog --- CHANGELOG.md | 5 +++++ yazi-actor/src/cmp/trigger.rs | 13 +++++++------ yazi-config/src/lib.rs | 2 +- yazi-config/src/tests.rs | 9 +++++++++ 4 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 yazi-config/src/tests.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index 15e56815..deded357 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/): - Make help menu a command palette ([#4074]) - Input history ([#4104]) - Experimental `%y`, `%Y`, `%t`, `%T`, `%yN`, `%YN`, `%tN`, `%TN` shell formatting parameters ([#4108]) +- Custom VFS provider ([#4118]) - Make visual mode support wraparound scrolling ([#4101]) - H/M/L Vim-like motion for moving cursor relative to viewport ([#3970]) - Context-aware icons for inputs ([#4080]) @@ -31,6 +32,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/): ### Changed - Rename `` to `` ([#3989]) +- Rename `type` field in `vfs.toml` to `kind`, leaving `type` available for future custom VFS parameters ([#4118]) +- Remove `Url.is_archive` so `archive://` can be registered as a custom scheme ([#4118]) - Make `mgr::Yanked`, `tab::Selected`, and the `@yank` DDS event return `File` instead of `Url` from `__pairs()` ([#4096]) - Remove `help:filter` action since the filter input is now always available ([#4074]) - `[help]` of `theme.toml`: supersede `on` with `chord`, supersede `run` and `desc` with `action`, remove `footer` ([#4074]) @@ -40,6 +43,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/): - Deprecate `backward --far` and `forward --far` in favor of `backward wide` and `forward wide`, respectively ([#4012]) - Deprecate `tab::Mode.is_visual` in favor of the new `tab::Mode.is_normal` ([#4101]) +- Deprecate `Url.is_regular`, `Url.is_search`, and `Url.domain` in favor of `Url.spec.is_regular`, `Url.spec.is_search`, and `Url.spec.domain`, respectively ([#4118]) ### Fixed @@ -1775,3 +1779,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/): [#4101]: https://github.com/sxyazi/yazi/pull/4101 [#4104]: https://github.com/sxyazi/yazi/pull/4104 [#4108]: https://github.com/sxyazi/yazi/pull/4108 +[#4118]: https://github.com/sxyazi/yazi/pull/4118 diff --git a/yazi-actor/src/cmp/trigger.rs b/yazi-actor/src/cmp/trigger.rs index d9ed4b52..1a2012ba 100644 --- a/yazi-actor/src/cmp/trigger.rs +++ b/yazi-actor/src/cmp/trigger.rs @@ -108,10 +108,11 @@ mod tests { #[test] fn test_split() { yazi_shared::init_tests(); + yazi_config::init_tests(); yazi_fs::init(); assert_eq!(Trigger::split_url(""), None); - assert_eq!(Trigger::split_url("sftp://test"), None); + assert_eq!(Trigger::split_url("sftp://vps"), None); compare(" ", "", " "); compare("/", "/", ""); @@ -127,11 +128,11 @@ mod tests { compare("/foo/bar", "/foo/", "bar"); compare("///foo/bar", "/foo/", "bar"); - CWD.set(&"sftp://test".parse::().unwrap(), || {}); - compare("sftp://test/a", "sftp://test/.", "a"); - compare("sftp://test//a", "sftp://test//", "a"); - compare("sftp://test2/a", "sftp://test2/.", "a"); - compare("sftp://test2//a", "sftp://test2//", "a"); + CWD.set(&"sftp://vps".parse::().unwrap(), || {}); + compare("sftp://vps/a", "sftp://vps/.", "a"); + compare("sftp://vps//a", "sftp://vps//", "a"); + compare("test-scope://aws/a", "test-scope://aws/.", "a"); + compare("test-scope://aws//a", "test-scope://aws//", "a"); } #[cfg(windows)] diff --git a/yazi-config/src/lib.rs b/yazi-config/src/lib.rs index 1e0b5f27..6a42d274 100644 --- a/yazi-config/src/lib.rs +++ b/yazi-config/src/lib.rs @@ -1,6 +1,6 @@ yazi_macro::mod_pub!(keymap mgr open opener plugin popup preview tasks theme vfs which); -yazi_macro::mod_flat!(icon inject layout mixing pattern platform preset priority selectable selector yazi); +yazi_macro::mod_flat!(icon inject layout mixing pattern platform preset priority selectable selector tests yazi); use std::io::{Read, Write}; diff --git a/yazi-config/src/tests.rs b/yazi-config/src/tests.rs new file mode 100644 index 00000000..4f955f41 --- /dev/null +++ b/yazi-config/src/tests.rs @@ -0,0 +1,9 @@ +use std::sync::OnceLock; + +use crate::{Preset, VFS}; + +pub fn init_tests() { + static INIT: OnceLock<()> = OnceLock::new(); + + INIT.get_or_init(|| VFS.init(Preset::vfs().unwrap())); +}