Major release 0.15.0

pull/345/head
Arijit Basu 3 years ago committed by Arijit Basu
parent 3a897ea0d1
commit 5e96d48135

50
Cargo.lock generated

@ -2,24 +2,24 @@
# It is not intended for manual editing.
[[package]]
name = "ansi-to-tui"
version = "0.4.0"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27ee8aff7256290439849cfde35078b996c3ce0a3cd5e0703f6c08384f0bc4a6"
checksum = "4c3fb5747c9d1b444cb6c9f96c84d09a3f7ae9e1eb77f52ec45c8bf30a6e6bdf"
dependencies = [
"tui",
]
[[package]]
name = "anyhow"
version = "1.0.43"
version = "1.0.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28ae2b3dec75a406790005a200b1bd89785afc02517a00ca99ecfe093ee9e6cf"
checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1"
[[package]]
name = "assert_cmd"
version = "2.0.0"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54f002ce7d0c5e809ebb02be78fd503aeed4a511fd0fcaff6e6914cbdabbfa33"
checksum = "b800c4403e8105d959595e1f88119e78bc12bc874c4336973658b648a746ba93"
dependencies = [
"bstr",
"doc-comment",
@ -218,6 +218,22 @@ dependencies = [
"winapi",
]
[[package]]
name = "crossterm"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "486d44227f71a1ef39554c0dc47e44b9f4139927c75043312690c3f476d1d788"
dependencies = [
"bitflags",
"crossterm_winapi",
"libc",
"mio",
"parking_lot",
"signal-hook",
"signal-hook-mio",
"winapi",
]
[[package]]
name = "crossterm_winapi"
version = "0.8.0"
@ -257,9 +273,9 @@ checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8"
[[package]]
name = "dirs"
version = "3.0.2"
version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309"
checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
dependencies = [
"dirs-sys",
]
@ -392,9 +408,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
version = "0.2.101"
version = "0.2.103"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21"
checksum = "dd8f7255a17a627354f321ef0055d63b898c6fb27eff628af4d1b66b7331edf6"
[[package]]
name = "linked-hash-map"
@ -493,9 +509,9 @@ dependencies = [
[[package]]
name = "mlua"
version = "0.6.2"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9da8658821057ea9d9ac349a02960be68e967f8a1e4b2a9d9efaefc4b9f2f47"
checksum = "34a8d7d9e39238b946f1baf17e710739a07dbcb8339aaf801f8a2ad1c40e4a68"
dependencies = [
"bstr",
"cc",
@ -812,9 +828,9 @@ dependencies = [
[[package]]
name = "serde_yaml"
version = "0.8.20"
version = "0.8.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad104641f3c958dab30eb3010e834c2622d1f3f4c530fef1dee20ad9485f3c09"
checksum = "d8c608a35705a5d3cdc9fbe403147647ff34b921f8e833e49306df898f9b20af"
dependencies = [
"dtoa",
"indexmap",
@ -913,7 +929,7 @@ checksum = "39c8ce4e27049eed97cfa363a5048b09d995e209994634a0efc26a14ab6c0c23"
dependencies = [
"bitflags",
"cassowary",
"crossterm",
"crossterm 0.20.0",
"serde",
"unicode-segmentation",
"unicode-width",
@ -1075,14 +1091,14 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "xplr"
version = "0.14.7"
version = "0.15.0"
dependencies = [
"ansi-to-tui",
"anyhow",
"assert_cmd",
"chrono",
"criterion",
"crossterm",
"crossterm 0.21.0",
"dirs",
"humansize",
"indexmap",

@ -1,6 +1,6 @@
[package]
name = "xplr"
version = "0.14.7" # Update lua.rs
version = "0.15.0" # Update lua.rs
authors = ["Arijit Basu <sayanarijit@gmail.com>"]
edition = "2018"
description = "A hackable, minimal, fast TUI file explorer"
@ -19,24 +19,24 @@ name = "xplr"
[dependencies]
tui = { version = "0.16.0", default-features = false, features = ['crossterm', 'serde'] }
crossterm = "0.20.0"
dirs = "3.0.2"
serde = { version = "1.0.128", features = ["derive"] }
serde_yaml = "0.8.19"
crossterm = "0.21.0"
dirs = "4.0.0"
serde = { version = "1.0.130", features = ["derive"] }
serde_yaml = "0.8.21"
mime_guess = "2.0.3"
anyhow = "1.0.43"
anyhow = "1.0.44"
chrono = { version = "0.4.19", features = ["serde"] }
lazy_static = "1.4.0"
indexmap = { version = "1.7.0", features = ["serde"] }
natord = "1.0.9"
humansize = "1.1.1"
mlua = { version = "0.6.2", features = ["luajit", "vendored", "serialize", "send"] }
ansi-to-tui = "0.4.0"
libc = "0.2.100"
mlua = { version = "0.6.4", features = ["luajit", "vendored", "serialize", "send"] }
ansi-to-tui = "0.4.1"
libc = "0.2.103"
[dev-dependencies]
criterion = "0.3.5"
assert_cmd = "2.0.0"
assert_cmd = "2.0.1"
[[bench]]
name = "criterion"

@ -1,5 +1,4 @@
Upgrade Guide
=============
# Upgrade Guide
When you upgrade xplr, you might see an error like this
@ -46,6 +45,27 @@ compatibility.
### Instructions
#### [v0.14.7][3] -> [v0.15.0][43]
- Added `CustomContent` as layout option that can be used to render custom
paragraphs, lists and tables. Both static and dynamic.
- Added support for optionally defining custom layouts for different modes.
- Added `xplr.config.general.focus_selection_ui` to highlight selected files
under focus differently than files under focus that are not selected.
- Added `PopModeKeepingInputBuffer`, and SwitchMode alternatives to allow
switching to different modes without resetting the input buffer.
- Removed `config` field from `CallLuaArg` as it's already available globally
as `xplr.config`.
- Fixed a bug which caused xplr to misbehave when used with specific tools and
environment (e.g. neovim, fzf, zsh4humans etc.).
- Recover mode will be disabled by default.
i.e. `xplr.config.general.disable_recover_mode` has been deprecated. Use
`xplr.config.general.enable_recover_mode` instead.
- Library users please refer to the latest API docs and examples.
- New homepage: https://xplr.dev
<sub>Like this project so far? **[Please consider contributing][5]**.</sub>
#### [v0.13.7][2] -> [v0.14.7][3]
- macOS users need to place their config file (`init.lua`) in
@ -64,9 +84,8 @@ compatibility.
- Since version `v0.14.6`, the `-C` or `--extra-config` CLI argument is
available.
<sub>Like this project so far? **[Please consider contributing][5]**.</sub>
#### [v0.12.1][6] -> [v0.13.7][2]
- Lua functions called using [`CallLua`][7] and [`CallLuaSilently`][8] messages will receive [`CallLuaArg`][9] object as the function argument (instead of the [`App`][10] object).
- Each `node_types` config will inherit defaults from matching less specifig `node_types` config and overwrite them.
- Since version `v0.13.2`, you don't need to use/send `Refresh` anymore. It will be auto-handled by xplr.
@ -158,7 +177,6 @@ Else do the following
#### [v0.4.2][27] -> [v0.4.3][26]
If you have customized `general.table.row.cols`, you might want to [update it][28] to use the new variables with better symlink support.
#### [v0.4.1][29] -> [v0.4.2][27]
@ -169,7 +187,7 @@ In case you have mapped the keys `q`, `ctrl-i` and `ctrl-o`, you may want to rev
A lot has changed (apologies). But I promise from now on, upgrading will be much less painful (thanks to [@maximbaz][31]'s valuable [inputs][32] and [code reviews][33]).
So, to start with the upgrade, let's remove everything from your config file except the `version` field and your custom modifications. If `version` is the only thing remaining, update it to `v0.4.1` and you are done.
So, to start with the upgrade, let's remove everything from your config file except the `version` field and your custom modifications. If `version` is the only thing remaining, update it to `v0.4.1` and you are done.
Else, do the following
@ -182,6 +200,7 @@ Else, do the following
- Finally, update the `version` to `v0.4.1`.
#### [v0.3.8][40] -> [v0.3.13][30]
Your current config should work fine. However, you might want to replace some `Call` and `BashExec` messages with `CallSilently` and `BashExecSilently` to remove the flickering of the screen.
If you haven't made any changes to the configuration, you can delete and regenerate it.
@ -209,6 +228,7 @@ Else, do the following
If you haven't made any changes to the configuration, you can delete and regenerate it.
Else do the following:
- `$XPLR_APP_YAML` has been removed. You can use `Debug` to export the app state.
- `$XPLR_RESULT` has been ported to file `$XPLR_PIPE_RESULT_OUT`. Use `cat` instead of `echo`, `<` instead of `<<<` etc.
- `$XPLR_GLOBAL_HELP_MENU` has been ported to
@ -219,46 +239,46 @@ Else do the following:
- `$XPLR_PIPE_RESULT` has been ported to file `$XPLR_PIPE_RESULT_OUT`. Use `cat` instead of `echo`, `<` instead of `<<<` etc.
- Finally, update the `version` in your config file.
[1]:#instructions
[2]:https://github.com/sayanarijit/xplr/releases/tag/v0.13.7
[3]:https://github.com/sayanarijit/xplr/releases/tag/v0.14.7
[4]:https://github.com/sayanarijit/xplr/pull/229#issue-662426960
[5]:contribute.md
[6]:https://github.com/sayanarijit/xplr/releases/tag/v0.12.1
[7]:https://docs.rs/xplr/latest/xplr/app/enum.ExternalMsg.html#variant.CallLua
[8]:https://docs.rs/xplr/latest/xplr/app/enum.ExternalMsg.html#variant.CallLuaSilently
[9]:https://docs.rs/xplr/latest/xplr/app/struct.CallLuaArg.html
[10]:https://docs.rs/xplr/latest/xplr/app/struct.App.html
[11]:https://github.com/sayanarijit/xplr/releases/tag/v0.11.1
[12]:https://github.com/sayanarijit/xplr/releases/tag/v0.10.2
[13]:https://github.com/sayanarijit/xplr/releases/tag/v0.9.1
[14]:https://github.com/sayanarijit/xplr/blob/85696ded7a/src/config.yml
[15]:https://github.com/sayanarijit/xplr/blob/main/src/init.lua
[16]:https://github.com/sayanarijit/xplr-yml2lua
[17]:https://github.com/sayanarijit/xplr/blob/bfdb7736b99bc3c5ae53e7d621ba0e7ca2299b14/src/init.lua#L2005-L2064
[18]:https://github.com/sayanarijit/xplr/pull/177#issue-650643573
[19]:https://github.com/sayanarijit/xplr/releases/tag/v0.9.0
[20]:https://github.com/sayanarijit/xplr/releases/tag/v0.8.0
[21]:https://github.com/sayanarijit/xplr/releases/tag/v0.7.2
[22]:https://github.com/sayanarijit/xplr/releases/tag/v0.7.0
[23]:https://github.com/sayanarijit/xplr/releases/tag/v0.6.0
[24]:https://github.com/sayanarijit/xplr/releases/tag/v0.5.13
[25]:https://github.com/sayanarijit/xplr/releases/tag/v0.5.0
[26]:https://github.com/sayanarijit/xplr/releases/tag/v0.4.3
[27]:https://github.com/sayanarijit/xplr/releases/tag/v0.4.2
[28]:https://github.com/sayanarijit/xplr/blob/af1cda5762/src/config.yml#L46-L48
[29]:https://github.com/sayanarijit/xplr/releases/tag/v0.4.1
[30]:https://github.com/sayanarijit/xplr/releases/tag/v0.3.13
[31]:https://github.com/maximbaz
[32]:https://github.com/sayanarijit/xplr/issues/45#issue-854447104
[33]:https://github.com/sayanarijit/xplr/pull/47
[34]:https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L124
[35]:https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L145
[36]:https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L154-L155
[37]:https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L45
[38]:https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L114
[39]:https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L180-L181
[40]:https://github.com/sayanarijit/xplr/releases/tag/v0.3.8
[41]:https://github.com/sayanarijit/xplr/releases/tag/v0.3.0
[42]:https://github.com/sayanarijit/xplr/releases/tag/v0.14.4
[1]: #instructions
[2]: https://github.com/sayanarijit/xplr/releases/tag/v0.13.7
[3]: https://github.com/sayanarijit/xplr/releases/tag/v0.14.7
[4]: https://github.com/sayanarijit/xplr/pull/229#issue-662426960
[5]: contribute.md
[6]: https://github.com/sayanarijit/xplr/releases/tag/v0.12.1
[7]: https://docs.rs/xplr/latest/xplr/app/enum.ExternalMsg.html#variant.CallLua
[8]: https://docs.rs/xplr/latest/xplr/app/enum.ExternalMsg.html#variant.CallLuaSilently
[9]: https://docs.rs/xplr/latest/xplr/app/struct.CallLuaArg.html
[10]: https://docs.rs/xplr/latest/xplr/app/struct.App.html
[11]: https://github.com/sayanarijit/xplr/releases/tag/v0.11.1
[12]: https://github.com/sayanarijit/xplr/releases/tag/v0.10.2
[13]: https://github.com/sayanarijit/xplr/releases/tag/v0.9.1
[14]: https://github.com/sayanarijit/xplr/blob/85696ded7a/src/config.yml
[15]: https://github.com/sayanarijit/xplr/blob/main/src/init.lua
[16]: https://github.com/sayanarijit/xplr-yml2lua
[17]: https://github.com/sayanarijit/xplr/blob/bfdb7736b99bc3c5ae53e7d621ba0e7ca2299b14/src/init.lua#L2005-L2064
[18]: https://github.com/sayanarijit/xplr/pull/177#issue-650643573
[19]: https://github.com/sayanarijit/xplr/releases/tag/v0.9.0
[20]: https://github.com/sayanarijit/xplr/releases/tag/v0.8.0
[21]: https://github.com/sayanarijit/xplr/releases/tag/v0.7.2
[22]: https://github.com/sayanarijit/xplr/releases/tag/v0.7.0
[23]: https://github.com/sayanarijit/xplr/releases/tag/v0.6.0
[24]: https://github.com/sayanarijit/xplr/releases/tag/v0.5.13
[25]: https://github.com/sayanarijit/xplr/releases/tag/v0.5.0
[26]: https://github.com/sayanarijit/xplr/releases/tag/v0.4.3
[27]: https://github.com/sayanarijit/xplr/releases/tag/v0.4.2
[28]: https://github.com/sayanarijit/xplr/blob/af1cda5762/src/config.yml#L46-L48
[29]: https://github.com/sayanarijit/xplr/releases/tag/v0.4.1
[30]: https://github.com/sayanarijit/xplr/releases/tag/v0.3.13
[31]: https://github.com/maximbaz
[32]: https://github.com/sayanarijit/xplr/issues/45#issue-854447104
[33]: https://github.com/sayanarijit/xplr/pull/47
[34]: https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L124
[35]: https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L145
[36]: https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L154-L155
[37]: https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L45
[38]: https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L114
[39]: https://github.com/sayanarijit/xplr/blob/055c1083d6/src/config.yml#L180-L181
[40]: https://github.com/sayanarijit/xplr/releases/tag/v0.3.8
[41]: https://github.com/sayanarijit/xplr/releases/tag/v0.3.0
[42]: https://github.com/sayanarijit/xplr/releases/tag/v0.14.4
[43]: https://github.com/sayanarijit/xplr/releases/tag/v0.15.0

@ -1005,6 +1005,8 @@ xplr.config.modes.builtin.recover = {
render = [[
You pressed an invalid key and went into "recover" mode.
This mode saves you from performing unwanted actions.
Let's calm down, press `escape`, and try again.
]],
},

@ -133,25 +133,25 @@ mod test {
assert!(check_version(VERSION, "foo path").is_ok());
// Current release if OK
assert!(check_version("0.14.7", "foo path").is_ok());
assert!(check_version("0.15.0", "foo path").is_ok());
// Prev major release is ERR
// - Not yet
// Prev minor release is ERR (Change when we get to v1)
assert!(check_version("0.13.7", "foo path").is_err());
assert!(check_version("0.14.0", "foo path").is_err());
// Prev bugfix release is OK
assert!(check_version("0.14.6", "foo path").is_ok());
// assert!(check_version("0.15.-1", "foo path").is_ok());
// Next major release is ERR
assert!(check_version("1.14.7", "foo path").is_err());
assert!(check_version("1.15.0", "foo path").is_err());
// Next minor release is ERR
assert!(check_version("0.15.7", "foo path").is_err());
assert!(check_version("0.16.7", "foo path").is_err());
// Next bugfix release is ERR (Change when we get to v1)
assert!(check_version("0.14.8", "foo path").is_err());
assert!(check_version("0.15.8", "foo path").is_err());
}
#[test]

Loading…
Cancel
Save