nushell/crates/nu-test-support/src
Devyn Cairns 2595f31541
Overhaul the plugin cache file with a new msgpack+brotli format (#12579)
# Description

- Plugin signatures are now saved to `plugin.msgpackz`, which is
brotli-compressed MessagePack.
- The file is updated incrementally, rather than writing all plugin
commands in the engine every time.
- The file always contains the result of the `Signature` call to the
plugin, even if commands were removed.
- Invalid data for a particular plugin just causes an error to be
reported, but the rest of the plugins can still be parsed

# User-Facing Changes

- The plugin file has a different filename, and it's not a nushell
script.
- The default `plugin.nu` file will be automatically migrated the first
time, but not other plugin config files.
- We don't currently provide any utilities that could help edit this
file, beyond `plugin add` and `plugin rm`
  - `from msgpackz`, `to msgpackz` could also help
- New commands: `plugin add`, `plugin rm`

# Tests + Formatting

Tests added for the format and for the invalid handling.

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

- [ ] Check for documentation changes
- [ ] Definitely needs release notes
2024-04-21 07:36:26 -05:00
..
playground Update tests Playground (#12134) 2024-03-08 20:31:21 -08:00
commands.rs Fix unit tests on Android (#10224) 2023-09-05 20:17:34 +12:00
fs.rs fix clippy (#10659) 2023-10-10 03:31:15 +13:00
lib.rs Allow spreading arguments to commands (#11289) 2023-12-28 15:43:20 +08:00
locale_override.rs Remove once_cell dependency from nu-test-support create. (#8568) 2023-03-22 19:36:52 +01:00
macros.rs Overhaul the plugin cache file with a new msgpack+brotli format (#12579) 2024-04-21 07:36:26 -05:00
playground.rs Update tests Playground (#12134) 2024-03-08 20:31:21 -08:00