mirror of
https://github.com/nushell/nushell.git
synced 2024-12-25 00:19:39 +01:00
73f3c0b60b
# Description Adds support for the following operations on plugin custom values, in addition to `to_base_value` which was already present: - `follow_path_int()` - `follow_path_string()` - `partial_cmp()` - `operation()` - `Drop` (notification, if opted into with `CustomValue::notify_plugin_on_drop`) There are additionally customizable methods within the `Plugin` and `StreamingPlugin` traits for implementing these functions in a way that requires access to the plugin state, as a registered handle model such as might be used in a dataframes plugin would. `Value::append` was also changed to handle custom values correctly. # User-Facing Changes - Signature of `CustomValue::follow_path_string` and `CustomValue::follow_path_int` changed to give access to the span of the custom value itself, useful for some errors. - Plugins using custom values have to be recompiled because the engine will try to do custom value operations that aren't supported - Plugins can do more things 🎉 # Tests + Formatting Tests were added for all of the new custom values functionality. - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting - [ ] Document protocol reference `CustomValueOp` variants: - [ ] `FollowPathInt` - [ ] `FollowPathString` - [ ] `PartialCmp` - [ ] `Operation` - [ ] `Dropped` - [ ] Document `notify_on_drop` optional field in `PluginCustomValue`
31 lines
741 B
TOML
31 lines
741 B
TOML
[package]
|
|
authors = ["The Nushell Project Developers"]
|
|
description = "Functionality for building Nushell plugins"
|
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin"
|
|
edition = "2021"
|
|
license = "MIT"
|
|
name = "nu-plugin"
|
|
version = "0.91.1"
|
|
|
|
[lib]
|
|
bench = false
|
|
|
|
[dependencies]
|
|
nu-engine = { path = "../nu-engine", version = "0.91.1" }
|
|
nu-protocol = { path = "../nu-protocol", version = "0.91.1" }
|
|
|
|
bincode = "1.3"
|
|
rmp-serde = "1.1"
|
|
serde = "1.0"
|
|
serde_json = { workspace = true }
|
|
log = "0.4"
|
|
miette = { workspace = true }
|
|
semver = "1.0"
|
|
typetag = "0.2"
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
windows = { version = "0.52", features = [
|
|
# For setting process creation flags
|
|
"Win32_System_Threading",
|
|
] }
|