nushell/crates
Poliorcetics 47867a58df
Ab/version details (#12593)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->
Closes #12561

# Description
<!--
Thank you for improving Nushell. Please, check our [contributing
guide](../CONTRIBUTING.md) and talk to the core team before making major
changes.

Description of your pull request goes here. **Provide examples and/or
screenshots** if your changes affect the user experience.
-->

Add version details in `version`'s output. The intended use is for
third-party tools to be able to quickly check version numbers without
having to the parsing from `(version).version` or `$env.NU_VERSION`.

# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

This adds 4 new values to the record from `version`:

```
...
│ major              │ 0                                               │
│ minor              │ 92                                              │
│ patch              │ 3                                               │
│ pre                │ a-value                                         │
...
```

`pre` is optional and won't be present most of the time I think.

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to
check that you're using the standard code style
- `cargo test --workspace` to check that all tests pass (on Windows make
sure to [enable developer
mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging))
- `cargo run -- -c "use std testing; testing run-tests --path
crates/nu-std"` to run the tests for the standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

I ran the new command using `cargo run -- -c version`:

```
╭────────────────────┬─────────────────────────────────────────────────╮
│ version            │ 0.92.3                                          │
│ major              │ 0                                               │
│ minor              │ 92                                              │
│ patch              │ 3                                               │
│ branch             │                                                 │
│ commit_hash        │                                                 │
│ build_os           │ macos-aarch64                                   │
│ build_target       │ aarch64-apple-darwin                            │
│ rust_version       │ rustc 1.77.2 (25ef9e3d8 2024-04-09)             │
│ rust_channel       │ 1.77.2-aarch64-apple-darwin                     │
│ cargo_version      │ cargo 1.77.2 (e52e36006 2024-03-26)             │
│ build_time         │ 2024-04-20 15:09:36 +02:00                      │
│ build_rust_channel │ release                                         │
│ allocator          │ mimalloc                                        │
│ features           │ default, sqlite, system-clipboard, trash, which │
│ installed_plugins  │                                                 │
╰────────────────────┴─────────────────────────────────────────────────╯
```

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->

After this is merged I would like to write docs somewhere for scripts
writer to advise using these members instead of the string values. Where
should I put said docs ?
2024-04-20 10:01:51 -05:00
..
nu_plugin_custom_values Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu_plugin_example Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu_plugin_formats Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu_plugin_gstat Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu_plugin_inc Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu_plugin_nu_example Add an example Nushell plugin written in Nushell itself (#12574) 2024-04-19 09:53:30 +03:00
nu_plugin_polars Removed the polars dtypes command (#12577) 2024-04-19 07:01:47 -05:00
nu_plugin_python Fix the error output in the python plugin to match LabeledError (#12575) 2024-04-18 20:01:35 -05:00
nu_plugin_query Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu_plugin_stress_internals Local socket mode and foreground terminal control for plugins (#12448) 2024-04-15 18:28:18 +00:00
nu-cli Fix circular source causing Nushell to crash (#12262) 2024-04-19 09:38:08 +03:00
nu-cmd-base Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-cmd-dataframe Upgrading nu-cmd-dataframe to polars 0.39 (#12554) 2024-04-17 12:50:17 -05:00
nu-cmd-extra Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
nu-cmd-lang Ab/version details (#12593) 2024-04-20 10:01:51 -05:00
nu-color-config Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-command add "to nuon" enumeration of possible styles (#12591) 2024-04-20 11:40:52 +02:00
nu-engine Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-explore Replace subtraction of Instants and Durations with saturating subtractions (#12549) 2024-04-17 07:25:16 -05:00
nu-glob Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-json Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-lsp improve nu --lsp command tooltips (#12589) 2024-04-20 07:16:38 -05:00
nu-parser Fix circular source causing Nushell to crash (#12262) 2024-04-19 09:38:08 +03:00
nu-path Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-plugin Switch plugin msgpack protocol to named format (#12580) 2024-04-19 07:50:51 -05:00
nu-plugin-test-support Local socket mode and foreground terminal control for plugins (#12448) 2024-04-15 18:28:18 +00:00
nu-pretty-hex Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-protocol Add an example Nushell plugin written in Nushell itself (#12574) 2024-04-19 09:53:30 +03:00
nu-std Fix circular source causing Nushell to crash (#12262) 2024-04-19 09:38:08 +03:00
nu-system Replace subtraction of Instants and Durations with saturating subtractions (#12549) 2024-04-17 07:25:16 -05:00
nu-table Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
nu-term-grid Bump version to 0.92.3 (#12476) 2024-04-12 08:00:43 -05:00
nu-test-support Local socket mode and foreground terminal control for plugins (#12448) 2024-04-15 18:28:18 +00:00
nu-utils Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
nuon add "to nuon" enumeration of possible styles (#12591) 2024-04-20 11:40:52 +02:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00

Nushell core libraries and plugins

These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.

Foundational libraries are split into two kinds of crates:

  • Core crates - those crates that work together to build the Nushell language engine
  • Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.

Plugins are likewise also split into two types:

  • Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
  • Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.