nushell/crates/nu-command/src
Stefan Holderbach b19da158d5
Rename Value::CustomValue to Value::Custom (#12309)
# Description
The second `Value` is redundant and will consume five extra bytes on
each transmission of a custom value to/from a plugin.

# User-Facing Changes
This is a breaking change to the plugin protocol.

The [example in the protocol
reference](https://www.nushell.sh/contributor-book/plugin_protocol_reference.html#value)
becomes

```json
{
  "Custom": {
    "val": {
      "type": "PluginCustomValue",
      "name": "database",
      "data": [36, 190, 127, 40, 12, 3, 46, 83],
      "notify_on_drop": true
    },
    "span": {
      "start": 320,
      "end": 340
    }
  }
}
```

instead of 

```json
{
  "CustomValue": {
    ...
  }
}
```


# After Submitting
Update plugin protocol reference
2024-03-27 22:10:56 +01:00
..
bytes Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
charting Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
conversions Rename Value::CustomValue to Value::Custom (#12309) 2024-03-27 22:10:56 +01:00
database Rename Value::CustomValue to Value::Custom (#12309) 2024-03-27 22:10:56 +01:00
date Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
debug Rename Value::CustomValue to Value::Custom (#12309) 2024-03-27 22:10:56 +01:00
env Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
experimental Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
filesystem Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
filters Rename Value::CustomValue to Value::Custom (#12309) 2024-03-27 22:10:56 +01:00
formats Rename Value::CustomValue to Value::Custom (#12309) 2024-03-27 22:10:56 +01:00
generators Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
hash Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
help ♻️ rework some help strings (#12306) 2024-03-27 08:41:02 -05:00
math Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
misc Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
network Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
path Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
platform Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
random Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
removed Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
shells Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
stor Rename Value::CustomValue to Value::Custom (#12309) 2024-03-27 22:10:56 +01:00
strings Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
system Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
viewers Rename Value::CustomValue to Value::Custom (#12309) 2024-03-27 22:10:56 +01:00
default_context.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
example_test.rs Initial --params implementation (#12249) 2024-03-24 15:40:21 -05:00
lib.rs Initial --params implementation (#12249) 2024-03-24 15:40:21 -05:00
progress_bar.rs remove cp-old (#11622) 2024-01-24 07:38:15 +08:00
sort_utils.rs Rename Value::CustomValue to Value::Custom (#12309) 2024-03-27 22:10:56 +01:00