mirror of
https://github.com/nushell/nushell.git
synced 2024-11-07 17:14:23 +01:00
cc8f2b6419
1385 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Maxim Zhiburt
|
cc8f2b6419
|
nu-explore/ Use hex-dump for binary data (#12184)
Hi there So as 2 minute thing we could show `hex-dump` as it is as a string (no-coloring). But I'd do some more things around,. Probably will take a few days (WIP). ``` ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ─────────────────────────────────────────────────────────────────────────────────────┬───────────────────────────────────────────────────────────── 00000000: 6d 6f 64 20 63 6f 6d 6d 61 6e 64 3b 0a 6d 6f 64 mod command;_mod │ 00000010: 20 63 6f 6e 66 69 67 5f 66 69 6c 65 73 3b 0a 6d config_files;_m │ 00000020: 6f 64 20 69 64 65 3b 0a 6d 6f 64 20 6c 6f 67 67 od ide;_mod logg │ 00000030: 65 72 3b 0a 6d 6f 64 20 72 75 6e 3b 0a 6d 6f 64 er;_mod run;_mod │ 00000040: 20 73 69 67 6e 61 6c 73 3b 0a 23 5b 63 66 67 28 signals;_#[cfg( │ 00000050: 75 6e 69 78 29 5d 0a 6d 6f 64 20 74 65 72 6d 69 unix)]_mod termi │ 00000060: 6e 61 6c 3b 0a 6d 6f 64 20 74 65 73 74 5f 62 69 nal;_mod test_bi │ 00000070: 6e 73 3b 0a 23 5b 63 66 67 28 74 65 73 74 29 5d ns;_#[cfg(test)] │ 00000080: 0a 6d 6f 64 20 74 65 73 74 73 3b 0a 0a 23 5b 63 _mod tests;__#[c │ 00000090: 66 67 28 66 65 61 74 75 72 65 20 3d 20 22 6d 69 fg(feature = "mi │ 000000a0: 6d 61 6c 6c 6f 63 22 29 5d 0a 23 5b 67 6c 6f 62 malloc")]_#[glob │ 000000b0: 61 6c 5f 61 6c 6c 6f 63 61 74 6f 72 5d 0a 73 74 al_allocator]_st │ 000000c0: 61 74 69 63 20 47 4c 4f 42 41 4c 3a 20 6d 69 6d atic GLOBAL: mim │ 000000d0: 61 6c 6c 6f 63 3a 3a 4d 69 4d 61 6c 6c 6f 63 20 alloc::MiMalloc │ 000000e0: 3d 20 6d 69 6d 61 6c 6c 6f 63 3a 3a 4d 69 4d 61 = mimalloc::MiMa │ 000000f0: 6c 6c 6f 63 3b 0a 0a 75 73 65 20 63 72 61 74 65 lloc;__use crate │ 00000100: 3a 3a 7b 0a 20 20 20 20 63 6f 6d 6d 61 6e 64 3a ::{_ command: │ 00000110: 3a 70 61 72 73 65 5f 63 6f 6d 6d 61 6e 64 6c 69 :parse_commandli │ 00000120: 6e 65 5f 61 72 67 73 2c 0a 20 20 20 20 63 6f 6e ne_args,_ con │ 00000130: 66 69 67 5f 66 69 6c 65 73 3a 3a 73 65 74 5f 63 fig_files::set_c │ 00000140: 6f 6e 66 69 67 5f 70 61 74 68 2c 0a 20 20 20 20 onfig_path,_ │ 00000150: 6c 6f 67 67 65 72 3a 3a 7b 63 6f 6e 66 69 67 75 logger::{configu │ 00000160: 72 65 2c 20 6c 6f 67 67 65 72 7d 2c 0a 7d 3b 0a re, logger},_};_ │ 00000170: 75 73 65 20 63 6f 6d 6d 61 6e 64 3a 3a 67 61 74 use command::gat │ 00000180: 68 65 72 5f 63 6f 6d 6d 61 6e 64 6c 69 6e 65 5f her_commandline_ │ 00000190: 61 72 67 73 3b 0a 75 73 65 20 6c 6f 67 3a 3a 4c args;_use log::L │ 000001a0: 65 76 65 6c 3b 0a 75 73 65 20 6d 69 65 74 74 65 evel;_use miette │ 000001b0: 3a 3a 52 65 73 75 6c 74 3b 0a 75 73 65 20 6e 75 ::Result;_use nu │ 000001c0: 5f 63 6c 69 3a 3a 67 61 74 68 65 72 5f 70 61 72 _cli::gather_par │ ``` ref: #12157 cc: @fdncred @lrdickson |
||
dependabot[bot]
|
6e2c41a5b5
|
Bump base64 from 0.21.7 to 0.22.0 (#12188)
Bumps [base64](https://github.com/marshallpierce/rust-base64) from 0.21.7 to 0.22.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md">base64's changelog</a>.</em></p> <blockquote> <h1>0.22.0</h1> <ul> <li><code>DecodeSliceError::OutputSliceTooSmall</code> is now conservative rather than precise. That is, the error will only occur if the decoded output <em>cannot</em> fit, meaning that <code>Engine::decode_slice</code> can now be used with exactly-sized output slices. As part of this, <code>Engine::internal_decode</code> now returns <code>DecodeSliceError</code> instead of <code>DecodeError</code>, but that is not expected to affect any external callers.</li> <li><code>DecodeError::InvalidLength</code> now refers specifically to the <em>number of valid symbols</em> being invalid (i.e. <code>len % 4 == 1</code>), rather than just the number of input bytes. This avoids confusing scenarios when based on interpretation you could make a case for either <code>InvalidLength</code> or <code>InvalidByte</code> being appropriate.</li> <li>Decoding is somewhat faster (5-10%)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
dependabot[bot]
|
bf799ac3ba
|
Bump heck from 0.4.1 to 0.5.0 (#12187)
Bumps [heck](https://github.com/withoutboats/heck) from 0.4.1 to 0.5.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/withoutboats/heck/blob/master/CHANGELOG.md">heck's changelog</a>.</em></p> <blockquote> <h1>0.5.0</h1> <ul> <li>Add <code>no_std</code> support.</li> <li>Remove non-additive <code>unicode</code> feature. The library now uses <code>char::is_alphanumeric</code> instead of the <code>unicode-segmentation</code> library to determine word boundaries in all cases.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/withoutboats/heck/commits">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=heck&package-manager=cargo&previous-version=0.4.1&new-version=0.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
dannou812
|
8237d15683
|
to json -r not removing whitespaces fix (#11948)
fixes #11900 # Description Use `serde_json` instead. # User-Facing Changes The problem described in the issue now no longer persists. No whitespace in the output of `to json --raw` Output of unicode escape changed to consistent `\uffff` # Tests + Formatting I corrected all Tests that were affected by this change. |
||
dependabot[bot]
|
b267a9c1ba
|
Bump uuid from 1.7.0 to 1.8.0 (#12246)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.7.0 to 1.8.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/uuid-rs/uuid/releases">uuid's releases</a>.</em></p> <blockquote> <h2>1.8.0</h2> <h2>⚠️ Potential Breakage ⚠️</h2> <p>A new <code>impl AsRef<Uuid> for Uuid</code> bound has been added, which can break inference on code like:</p> <pre lang="rust"><code>let b = uuid.as_ref(); </code></pre> <p>You can fix these by explicitly typing the result of the conversion:</p> <pre lang="rust"><code>let b: &[u8] = uuid.as_ref(); </code></pre> <p>or by calling <code>as_bytes</code> instead:</p> <pre lang="rust"><code>let b = uuid.as_bytes(); </code></pre> <h2>What's Changed</h2> <ul> <li>docs: fix small spelling mistake by <a href="https://github.com/bengsparks"><code>@bengsparks</code></a> in <a href="https://redirect.github.com/uuid-rs/uuid/pull/737">uuid-rs/uuid#737</a></li> <li>serde serialize_with support by <a href="https://github.com/dakaizou"><code>@dakaizou</code></a> in <a href="https://redirect.github.com/uuid-rs/uuid/pull/735">uuid-rs/uuid#735</a></li> <li>Fix up CI builds by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/uuid-rs/uuid/pull/744">uuid-rs/uuid#744</a></li> <li>Only add <code>wasm-bindgen</code> as a dependency on <code>wasm32-unknown-unknown</code> by <a href="https://github.com/emilk"><code>@emilk</code></a> in <a href="https://redirect.github.com/uuid-rs/uuid/pull/738">uuid-rs/uuid#738</a></li> <li>impl AsRef<!-- raw HTML omitted --> for Uuid by <a href="https://github.com/koshell"><code>@koshell</code></a> in <a href="https://redirect.github.com/uuid-rs/uuid/pull/743">uuid-rs/uuid#743</a></li> <li>Add v6 to v8 draft link to README by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/uuid-rs/uuid/pull/746">uuid-rs/uuid#746</a></li> <li>Add a workflow for running cargo outdated by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/uuid-rs/uuid/pull/745">uuid-rs/uuid#745</a></li> <li>Prepare for 1.8.0 release by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/uuid-rs/uuid/pull/747">uuid-rs/uuid#747</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/bengsparks"><code>@bengsparks</code></a> made their first contribution in <a href="https://redirect.github.com/uuid-rs/uuid/pull/737">uuid-rs/uuid#737</a></li> <li><a href="https://github.com/dakaizou"><code>@dakaizou</code></a> made their first contribution in <a href="https://redirect.github.com/uuid-rs/uuid/pull/735">uuid-rs/uuid#735</a></li> <li><a href="https://github.com/emilk"><code>@emilk</code></a> made their first contribution in <a href="https://redirect.github.com/uuid-rs/uuid/pull/738">uuid-rs/uuid#738</a></li> <li><a href="https://github.com/koshell"><code>@koshell</code></a> made their first contribution in <a href="https://redirect.github.com/uuid-rs/uuid/pull/743">uuid-rs/uuid#743</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/uuid-rs/uuid/compare/1.7.0...1.8.0">https://github.com/uuid-rs/uuid/compare/1.7.0...1.8.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
Devyn Cairns
|
a29efe28f7
|
Merge stream_example into example plugin and clean up names (#12234)
# Description As suggested by @WindSoilder, since plugins can now contain both simple commands that produce `Value` and commands that produce `PipelineData` without having to choose one or the other for the whole plugin, this change merges `stream_example` into `example`. # User-Facing Changes All of the example plugins are renamed. # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting - [ ] Check nushell/nushell.github.io for any docs that match the command names changed |
||
Tastaturtaste
|
c7e0d4b1e5
|
Use the system clipboard only for explicit copy/paste operations. Addresses issue 11907 (#12179)
<!-- 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! --> # 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. --> With the introduction of the system clipboard to nushell, many commands changed their behavior from using a local cut buffer to the system clipboard, perhaps surprisingly for many users. (See #11907) This PR changes most of them back to using the local cut buffer and introduces three commands (`CutSelectionSystem`, `CopySelectionSystem` and `PasteSystem`) to explicitly use the system clipboard. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> Users who in the meantime already used the system clipboard now default back to the local clipboard. To be able to use the system clipboard again they have to append the suffix `system` to their current edit command specified in their keybindings. # 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 > ``` --> The commands themselves are tested in `reedline`. The changes introduces in nushell are minimal and simply forward from a match on the keybinding name to the command. # 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. --> --------- Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com> |
||
sarubo
|
687fbc49c8
|
Adjust permissions using umask in mkdir (#12207)
<!-- 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! --> # 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. --> With this change, `mkdir` mirrors coreutils works. Closes #12161 I referred to the implementation of `mkdir` in uutils/coreutils. I add `uucore` required for implementation to dependencies. Since `uucore` is already included in dependencies of `uu_mkdir`, I don't think there will be any additional dependencies. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> - Directories are created according to `umask` except for Windows. # 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 add `mkdir` test considering permissions. The test assumes that the default `umask` is `022`. # 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. --> |
||
Stefan Holderbach
|
d3f22588f0
|
Disable fmt feature of polars(-core) (#12151)
In normal operations we don't display the dataframes directly. The `fmt` feature on `polars-core` pulls in the `comfy-table` crate with its own dependencies on `crossterm` and `strum(_macros)`. This has the chance to duplicate dependencies. (currently strum version divergence) Without this feature only the shapes should be displayed. May degrade the error output during testing. |
||
dependabot[bot]
|
8725bd3112
|
Bump rayon from 1.8.1 to 1.9.0 (#12186)
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.8.1 to 1.9.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/rayon-rs/rayon/blob/main/RELEASES.md">rayon's changelog</a>.</em></p> <blockquote> <h1>Release rayon 1.9.0 (2024-02-27)</h1> <ul> <li>The new methods <code>IndexedParallelIterator::by_exponential_blocks</code> and <code>by_uniform_blocks</code> allow processing items in smaller groups at a time.</li> <li>The new <code>iter::walk_tree</code>, <code>walk_tree_prefix</code>, and <code>walk_tree_postfix</code> functions enable custom parallel iteration over tree-like structures.</li> <li>The new method <code>ParallelIterator::collect_vec_list</code> returns items as a linked list of vectors, which is an efficient mode of parallel collection used by many of the internal implementations of <code>collect</code>.</li> <li>The new methods <code>ParallelSliceMut::par_split_inclusive_mut</code>, <code>ParallelSlice::par_split_inclusive</code>, and <code>ParallelString::par_split_inclusive</code> all work like a normal split but keeping the separator as part of the left slice.</li> <li>The new <code>ParallelString::par_split_ascii_whitespace</code> splits only on ASCII whitespace, which is faster than including Unicode multi-byte whitespace.</li> <li><code>OsString</code> now implements <code>FromParallelIterator<_></code> and <code>ParallelExtend<_></code> for a few item types similar to the standard <code>FromIterator</code> and <code>Extend</code>.</li> <li>The internal <code>Pattern</code> trait for string methods is now implemented for <code>[char; N]</code> and <code>&[char; N]</code>, matching any of the given characters.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
dependabot[bot]
|
32529433fb
|
Bump miette from 7.1.0 to 7.2.0 (#12189)
Bumps [miette](https://github.com/zkat/miette) from 7.1.0 to 7.2.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/zkat/miette/blob/main/CHANGELOG.md">miette's changelog</a>.</em></p> <blockquote> <h2>7.2.0 (2024-03-07)</h2> <h3>Features</h3> <ul> <li><strong>wasm:</strong> add feature "fancy-no-syscall" for wasm targets (<a href="https://redirect.github.com/zkat/miette/issues/349">#349</a>) (<a href=" |
||
Stefan Holderbach
|
bb265c5310
|
Bump arboard from 3.3.0 to 3.3.2 (#12178)
Reduces the system dependency footprint slightly |
||
Stefan Holderbach
|
f3a4f10b46
|
Bump iana-time-zone due to yanked locked version (#12162)
`0.1.59` -> `0.1.60` e.g. observed in https://github.com/nushell/nushell/actions/runs/8238152611/job/22528639253#step:4:18 |
||
Yash Thakur
|
f6853fd636
|
Use XDG_CONFIG_HOME before default config directory (#12118)
<!-- 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 #12103 # 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. --> As described in #12103, this PR makes Nushell use `XDG_CONFIG_HOME` as the config directory if it exists. Otherwise, it uses the old behavior, which was to use `dirs_next::config_dir()`. Edit: We discussed choosing between `XDG_CONFIG_HOME` and the default config directory in Discord and decided against it, at least for now. <s>@kubouch also suggested letting users choose between `XDG_CONFIG_HOME` and the default config directory if config files aren't found on startup and `XDG_CONFIG_HOME` is set to a value different from the default config directory</s> On Windows and MacOS, if the `XDG_CONFIG_HOME` variable is set but `XDG_CONFIG_HOME` is either empty or doesn't exist *and* the old config directory is non-empty, Nushell will issue a warning on startup saying that it won't move files from the old config directory to the new one. To do this, I had to add a `nu_path::config_dir_old()` function. I assume that at some point, we will remove the warning message and the function can be removed too. Alternatively, instead of having that function there, `main.rs` could directly call `dirs_next::config_dir()`. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> When `$env.XDG_CONFIG_HOME` is set to an absolute path, Nushell will use `$"($env.XDG_CONFIG_HOME)/nushell"` as its config directory (previously, this only worked on Linux). To use `App Data\Roaming` (Windows) or `Library/Application Support` (MacOS) instead (the old behavior), one can either leave `XDG_CONFIG_HOME` unset or set it to an empty string. If `XDG_CONFIG_HOME` is set, but to a non-absolute/invalid path, Nushell will report an error on startup and use the default config directory instead: ![image](https://github.com/nushell/nushell/assets/45539777/a434fe04-b7c8-4e95-b50c-80628008ad08) On Windows and MacOS, if the `XDG_CONFIG_HOME` variable is set but `XDG_CONFIG_HOME` is either empty or doesn't exist *and* the old config directory is non-empty, Nushell will issue a warning on startup saying that it won't move files from the old config directory to the new one. ![image](https://github.com/nushell/nushell/assets/45539777/1686cc17-4083-4c12-aecf-1d832460ca57) # 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 > ``` --> The existing config path tests have been modified to use `XDG_CONFIG_HOME` to change the config directory on all OSes, not just Linux. # 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. --> The documentation will have to be updated to note that Nushell uses `XDG_CONFIG_HOME` now. As @fdncred pointed out, it's possible for people to set `XDG_CONFIG_HOME` to, say, `~/.config/nushell` rather than `~/.config`, so the documentation could warn about that mistake. |
||
Stefan Holderbach
|
27edef4874
|
Bump reedline to dev (and strum ) (#12150)
Resolve version duplication around `strum(_macros)` - Pull recent reedline (`strum` update) - Update `strum` in `nu-protocol` |
||
Devyn Cairns
|
bc19be25b1
|
Keep plugins persistently running in the background (#12064)
# Description This PR uses the new plugin protocol to intelligently keep plugin processes running in the background for further plugin calls. Running plugins can be seen by running the new `plugin list` command, and stopped by running the new `plugin stop` command. This is an enhancement for the performance of plugins, as starting new plugin processes has overhead, especially for plugins in languages that take a significant amount of time on startup. It also enables plugins that have persistent state between commands, making the migration of features like dataframes and `stor` to plugins possible. Plugins are automatically stopped by the new plugin garbage collector, configurable with `$env.config.plugin_gc`: ```nushell $env.config.plugin_gc = { # Configuration for plugin garbage collection default: { enabled: true # true to enable stopping of inactive plugins stop_after: 10sec # how long to wait after a plugin is inactive to stop it } plugins: { # alternate configuration for specific plugins, by name, for example: # # gstat: { # enabled: false # } } } ``` If garbage collection is enabled, plugins will be stopped after `stop_after` passes after they were last active. Plugins are counted as inactive if they have no running plugin calls. Reading the stream from the response of a plugin call is still considered to be activity, but if a plugin holds on to a stream but the call ends without an active streaming response, it is not counted as active even if it is reading it. Plugins can explicitly disable the GC as appropriate with `engine.set_gc_disabled(true)`. The `version` command now lists plugin names rather than plugin commands. The list of plugin commands is accessible via `plugin list`. Recommend doing this together with #12029, because it will likely force plugin developers to do the right thing with mutability and lead to less unexpected behavior when running plugins nested / in parallel. # User-Facing Changes - new command: `plugin list` - new command: `plugin stop` - changed command: `version` (now lists plugin names, rather than commands) - new config: `$env.config.plugin_gc` - Plugins will keep running and be reused, at least for the configured GC period - Plugins that used mutable state in weird ways like `inc` did might misbehave until fixed - Plugins can disable GC if they need to - Had to change plugin signature to accept `&EngineInterface` so that the GC disable feature works. #12029 does this anyway, and I'm expecting (resolvable) conflicts with that # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` Because there is some specific OS behavior required for plugins to not respond to Ctrl-C directly, I've developed against and tested on both Linux and Windows to ensure that works properly. # After Submitting I think this probably needs to be in the book somewhere |
||
Yash Thakur
|
c90640411d
|
Update tests Playground (#12134)
<!-- 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! --> # 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. --> It looks like `Playground` and `Director` in nu-tests-support haven't gotten much love recently, so this PR is for updating them to work with newer Nushell versions. - `Director` adds a `--skip-plugins` argument before running `nu`, but that doesn't exist anymore, so I removed it. - `Director` also adds a `--perf` argument, which also doesn't exist anymore. I added `--log-level info` instead to get the performance output. - It doesn't seem like anyone was using `playground::matchers`, and it used the [hamcrest2](https://github.com/Valloric/hamcrest2-rust) crate, which appears to be unmaintained, so I got rid of that (and the `hamcrest2` dependency). - Inside `tests/fixtures/playground/config` were two files in the old config format: `default.toml` and `startup.toml`. I removed those too. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> None, these changes only mess with tests. # 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 > ``` --> # 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. --> |
||
dependabot[bot]
|
b2b4562376
|
Bump windows from 0.52.0 to 0.54.0 (#12037)
Bumps [windows](https://github.com/microsoft/windows-rs) from 0.52.0 to 0.54.0. <details> <summary>Commits</summary> <ul> <li><a href=" |
||
Antoine Büsch
|
979a97c455
|
Introduce workspace dependencies (#12043)
# Description This PR introduces [workspaces dependencies](https://doc.rust-lang.org/cargo/reference/workspaces.html#the-dependencies-table). The advantages are: - a single place where dependency versions are declared - reduces the number of files to change when upgrading a dependency - reduces the risk of accidentally depending on 2 different versions of the same dependency I've only done a few so far. If this PR is accepted, I might continue and progressively do the rest. # User-Facing Changes N/A # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting N/A |
||
Ian Manske
|
dfe072fd30
|
Fix chrono deprecation warnings (#12091)
# Description Bumps `chrono` to 0.4.35 and fixes any deprecation warnings. |
||
dependabot[bot]
|
3740b50eab
|
Bump scraper from 0.18.1 to 0.19.0 (#12060)
Bumps [scraper](https://github.com/causal-agent/scraper) from 0.18.1 to 0.19.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/causal-agent/scraper/releases">scraper's releases</a>.</em></p> <blockquote> <h2>0.19.0</h2> <h2>What's Changed</h2> <ul> <li>Bump ahash from 0.8.3 to 0.8.6 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/causal-agent/scraper/pull/156">causal-agent/scraper#156</a></li> <li>Bump indexmap from 2.0.2 to 2.1.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/causal-agent/scraper/pull/159">causal-agent/scraper#159</a></li> <li>Add convenience methods to iterate only over child and descendant elements instead of all nodes. by <a href="https://github.com/adamreichold"><code>@adamreichold</code></a> in <a href="https://redirect.github.com/causal-agent/scraper/pull/158">causal-agent/scraper#158</a></li> <li>Add trait to abstract over selectable collections of elements by <a href="https://github.com/adamreichold"><code>@adamreichold</code></a> in <a href="https://redirect.github.com/causal-agent/scraper/pull/155">causal-agent/scraper#155</a></li> <li>Bump once_cell from 1.18.0 to 1.19.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/causal-agent/scraper/pull/161">causal-agent/scraper#161</a></li> <li>Another try at actually using an nth index cache by <a href="https://github.com/adamreichold"><code>@adamreichold</code></a> in <a href="https://redirect.github.com/causal-agent/scraper/pull/164">causal-agent/scraper#164</a></li> <li>Bump ahash from 0.8.6 to 0.8.7 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/causal-agent/scraper/pull/165">causal-agent/scraper#165</a></li> <li>Bump indexmap from 2.1.0 to 2.2.1 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/causal-agent/scraper/pull/166">causal-agent/scraper#166</a></li> <li>Bump indexmap from 2.2.1 to 2.2.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/causal-agent/scraper/pull/167">causal-agent/scraper#167</a></li> <li>Bump ahash from 0.8.7 to 0.8.9 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/causal-agent/scraper/pull/172">causal-agent/scraper#172</a></li> <li>Bump indexmap from 2.2.2 to 2.2.3 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/causal-agent/scraper/pull/171">causal-agent/scraper#171</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/causal-agent/scraper/compare/v0.18.1...v0.19.0">https://github.com/causal-agent/scraper/compare/v0.18.1...v0.19.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
dependabot[bot]
|
9c00757a5e
|
Bump open from 5.0.1 to 5.1.1 (#12061)
Bumps [open](https://github.com/Byron/open-rs) from 5.0.1 to 5.1.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/Byron/open-rs/releases">open's releases</a>.</em></p> <blockquote> <h2>v5.1.1</h2> <h3>Bug Fixes</h3> <ul> <li>add <code>shellexecute-on-windows</code> feature. That way, it's possible to toggle on a feature that might cause issues in some dependency trees that contain <code>flate2</code> with <code>zlib-ng</code> backend.</li> </ul> <h3>Commit Statistics</h3> <ul> <li>3 commits contributed to the release.</li> <li>2 days passed between releases.</li> <li>1 commit was understood as <a href="https://www.conventionalcommits.org">conventional</a>.</li> <li>0 issues like '(#ID)' were seen in commit messages</li> </ul> <h3>Commit Details</h3> <!-- raw HTML omitted --> <!-- raw HTML omitted --> <ul> <li><strong>Uncategorized</strong> <ul> <li>Merge branch 'validate-linkage' (59886df)</li> <li>Add <code>shellexecute-on-windows</code> feature. (74fd8ec)</li> <li>Try to validate linkage on all platforms (8f26da4)</li> </ul> </li> </ul> <!-- raw HTML omitted --> <h2>v5.1.0</h2> <h3>New Features</h3> <ul> <li>use <code>ShellExecuteW</code> for detached spawning on Windows</li> </ul> <h3>Commit Statistics</h3> <ul> <li>3 commits contributed to the release.</li> <li>2 days passed between releases.</li> <li>1 commit was understood as <a href="https://www.conventionalcommits.org">conventional</a>.</li> <li>0 issues like '(#ID)' were seen in commit messages</li> </ul> <h3>Commit Details</h3> <!-- raw HTML omitted --> <!-- raw HTML omitted --> <ul> <li><strong>Uncategorized</strong> <ul> <li>Merge pull request <a href="https://redirect.github.com/Byron/open-rs/issues/91">#91</a> from amrbashir/feat/windows/detachded-using-shellexecutew (b268647)</li> <li>Split into two functions for better readability (4506b2f)</li> <li>Use <code>ShellExecuteW</code> for detached spawning on Windows (191cb0e)</li> </ul> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/Byron/open-rs/blob/main/changelog.md">open's changelog</a>.</em></p> <blockquote> <h2>5.1.1 (2024-03-03)</h2> <h3>Bug Fixes</h3> <ul> <li><!-- raw HTML omitted --> add <code>shellexecute-on-windows</code> feature. That way, it's possible to toggle on a feature that might cause issues in some dependency trees that contain <code>flate2</code> with <code>zlib-ng</code> backend.</li> </ul> <h3>Commit Statistics</h3> <!-- raw HTML omitted --> <ul> <li>3 commits contributed to the release.</li> <li>2 days passed between releases.</li> <li>1 commit was understood as <a href="https://www.conventionalcommits.org">conventional</a>.</li> <li>0 issues like '(#ID)' were seen in commit messages</li> </ul> <h3>Commit Details</h3> <!-- raw HTML omitted --> <!-- raw HTML omitted --> <ul> <li><strong>Uncategorized</strong> <ul> <li>Merge branch 'validate-linkage' (<a href=" |
||
dependabot[bot]
|
85fb3e1ff3
|
Bump mockito from 1.3.0 to 1.4.0 (#12063) | ||
Stefan Holderbach
|
e5f086cfb4
|
Bump version to 0.91.1 (#12085)
|
||
Stefan Holderbach
|
3016d7a64c
|
Bump version for 0.91.0 release (#12070) | ||
Stefan Holderbach
|
9a07b41c9d
|
Pin reedline to 0.30.0 release (#12081)
https://github.com/nushell/reedline/releases/tag/v0.30.0 |
||
dependabot[bot]
|
565c6409d9
|
Bump mio from 0.8.10 to 0.8.11 (#12077) | ||
Filip Andersson
|
9ff92c6878
|
replace Criterion with Divan (#12000)
<!-- 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! --> # 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. --> This is a test of changing out the current criterion microbenchmark tool to [Divan](https://nikolaivazquez.com/blog/divan/), a new and more straightforward microbenchmark suit. Itself states it is robust to noise, and even allow it to be used in CI settings. It by default has no external dependencies and is very fast to run, the sampling method allows it to be a lot faster compared to criterion requiring less samples. The output is also nicely displayed and easy to get a quick overview of the performance. ![image](https://github.com/nushell/nushell/assets/17986183/587a1fb1-1da3-402c-b668-a27fde9a0657) # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> # 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 > ``` --> # 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. --> |
||
moonlander
|
d3895d71db
|
add binary data handling to bits commands (#11854)
# Description - enables `bits` commands to operate on binary data, where both inputs are binary and can vary in length - adds an `--endian` flag to `bits and`, `or`, `xor` for specifying endianness (for binary values of different lengths) # User-Facing Changes - `bits` commands will no longer error for non-int inputs - the default for `--number-bytes` is now `auto` (infer int size; changed from 8) # Tests + Formatting > addendum: first PR, please inform if any changes are needed |
||
Darren Schroeder
|
523d57b2d8
|
bump reedline to test ExecuteHostCommand changes (#11993)
# Description This PR bumps reedline to the latest main which has the `executehostcommand` changes https://github.com/nushell/reedline/pull/758 which essentially allows reedline/nushell to call `executehostcommand` in key bindings and rewrite the commandline buffer without inserting a newline. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> # 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 > ``` --> # 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. --> |
||
dependabot[bot]
|
2697ea9a25
|
Bump mockito from 1.2.0 to 1.3.0 (#11976)
Bumps [mockito](https://github.com/lipanski/mockito) from 1.2.0 to 1.3.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/lipanski/mockito/releases">mockito's releases</a>.</em></p> <blockquote> <h2>1.3.0</h2> <ul> <li><a href=" |
||
dependabot[bot]
|
55b67e17bb
|
Bump tempfile from 3.9.0 to 3.10.0 (#11977)
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.9.0 to 3.10.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md">tempfile's changelog</a>.</em></p> <blockquote> <h2>3.10.0</h2> <ul> <li>Drop <code>redox_syscall</code> dependency, we now use <code>rustix</code> for Redox.</li> <li>Add <code>Builder::permissions</code> for setting the permissions on temporary files and directories (thanks to <a href="https://github.com/Byron"><code>@Byron</code></a>).</li> <li>Update rustix to 0.38.31.</li> <li>Update fastrand to 2.0.1.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
dependabot[bot]
|
123547444c
|
Bump strum_macros from 0.25.3 to 0.26.1 (#11979)
Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.25.3 to 0.26.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/Peternator7/strum/releases">strum_macros's releases</a>.</em></p> <blockquote> <h2>v0.26.1</h2> <h2>0.26.1</h2> <ul> <li><a href="https://redirect.github.com/Peternator7/strum/pull/325">#325</a>: use <code>core</code> instead of <code>std</code> in VariantArray.</li> </ul> <h2>0.26.0</h2> <h3>Breaking Changes</h3> <ul> <li>The <code>EnumVariantNames</code> macro has been renamed <code>VariantNames</code>. The deprecation warning should steer you in the right direction for fixing the warning.</li> <li>The Iterator struct generated by EnumIter now has new bounds on it. This shouldn't break code unless you manually added the implementation in your code.</li> <li><code>Display</code> now supports format strings using named fields in the enum variant. This should be a no-op for most code. However, if you were outputting a string like <code>"Hello {field}"</code>, this will now be interpretted as a format string.</li> <li>EnumDiscriminant now inherits the repr and discriminant values from your main enum. This makes the discriminant type closer to a mirror of the original and that's always the goal.</li> </ul> <h3>New features</h3> <ul> <li> <p>The <code>VariantArray</code> macro has been added. This macro adds an associated constant <code>VARIANTS</code> to your enum. The constant is a <code>&'static [Self]</code> slice so that you can access all the variants of your enum. This only works on enums that only have unit variants.</p> <pre lang="rust"><code>use strum::VariantArray; <p>#[derive(Debug, VariantArray)] enum Color { Red, Blue, Green, }</p> <p>fn main() { println!("{:?}", Color::VARIANTS); // prints: ["Red", "Blue", "Green"] } </code></pre></p> </li> <li> <p>The <code>EnumTable</code> macro has been <em>experimentally</em> added. This macro adds a new type that stores an item for each variant of the enum. This is useful for storing a value for each variant of an enum. This is an experimental feature because I'm not convinced the current api surface area is correct.</p> <pre lang="rust"><code>use strum::EnumTable; <p>#[derive(Copy, Clone, Debug, EnumTable)] enum Color { Red, Blue, </code></pre></p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/Peternator7/strum/blob/master/CHANGELOG.md">strum_macros's changelog</a>.</em></p> <blockquote> <h2>0.26.1</h2> <ul> <li><a href="https://redirect.github.com/Peternator7/strum/pull/325">#325</a>: use <code>core</code> instead of <code>std</code> in VariantArray.</li> </ul> <h2>0.26.0</h2> <h3>Breaking Changes</h3> <ul> <li>The <code>EnumVariantNames</code> macro has been renamed <code>VariantNames</code>. The deprecation warning should steer you in the right direction for fixing the warning.</li> <li>The Iterator struct generated by EnumIter now has new bounds on it. This shouldn't break code unless you manually added the implementation in your code.</li> <li><code>Display</code> now supports format strings using named fields in the enum variant. This should be a no-op for most code. However, if you were outputting a string like <code>"Hello {field}"</code>, this will now be interpretted as a format string.</li> <li>EnumDiscriminant now inherits the repr and discriminant values from your main enum. This makes the discriminant type closer to a mirror of the original and that's always the goal.</li> </ul> <h3>New features</h3> <ul> <li> <p>The <code>VariantArray</code> macro has been added. This macro adds an associated constant <code>VARIANTS</code> to your enum. The constant is a <code>&'static [Self]</code> slice so that you can access all the variants of your enum. This only works on enums that only have unit variants.</p> <pre lang="rust"><code>use strum::VariantArray; <p>#[derive(Debug, VariantArray)] enum Color { Red, Blue, Green, }</p> <p>fn main() { println!("{:?}", Color::VARIANTS); // prints: ["Red", "Blue", "Green"] } </code></pre></p> </li> <li> <p>The <code>EnumTable</code> macro has been <em>experimentally</em> added. This macro adds a new type that stores an item for each variant of the enum. This is useful for storing a value for each variant of an enum. This is an experimental feature because I'm not convinced the current api surface area is correct.</p> <pre lang="rust"><code>use strum::EnumTable; <p>#[derive(Copy, Clone, Debug, EnumTable)] enum Color { Red, Blue, Green, </code></pre></p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/Peternator7/strum/commits/v0.26.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=strum_macros&package-manager=cargo&previous-version=0.25.3&new-version=0.26.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
Devyn Cairns
|
88f1f386bb
|
Bidirectional communication and streams for plugins (#11911) | ||
nils-degroot
|
67a63162b2
|
Add date support in from xlsx (#11952)
<!-- 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! --> # 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. --> This PR add date support when using the `open` command on a xlsx file, and the using `from xlsx` on a xlsx file. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> Currently dates in xlsx files are read as nulls, after this PR this would be regular dates. # 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 > ``` --> # 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. --> |
||
Darren Schroeder
|
a2a1c1656f
|
remove unused dependencies (#11938)
# Description This PR removes unused dependencies. The `cargo machete --with-metadata` tool was used to determine what is unused and then I recompiled. Putting this up here to see what happens in MacOS and Linux in the CI and see if anything breaks. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> # 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 > ``` --> # 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. --> |
||
Jack Wright
|
f17f857b1f
|
wrapping run_repl with catch_unwind and restarting the repl on panic (#11860)
Provides the ability to cleanly recover from panics, falling back to the last known good state of EngineState and Stack. This pull request also utilizes miette's panic handler for better formatting of panics. <img width="642" alt="Screenshot 2024-02-21 at 08 34 35" src="https://github.com/nushell/nushell/assets/56345/f81efaba-aa45-4e47-991c-1a2cf99e06ff"> --------- Co-authored-by: Jack Wright <jack.wright@disqo.com> |
||
David Matos
|
123bf2d736
|
fix format date based on users locale (#11908)
<!-- 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! --> # Description Hi, Fixes #10838, where before the `date` would be formatted incorrectly, and was not picking `LC_TIME` for time formatting, but it picked the first locale returned by the `sys-locale` crate instead. Now it will format time based on `LC_TIME`. For example, ``` // my locale `nl_NL.UTF-8` ❯ date now | format date '%x %X' 20-02-24 17:17:12 $env.LC_TIME = "en_US.UTF-8" ❯ date now | format date '%x %X' 02/20/2024 05:16:28 PM ``` Note that I also changed the `default_env.nu` as otherwise the Time will show AM/PM twice. Also reason for the `chrono` update is because this relies on a fix to upstream repo, which i initially submitted an [issue](https://github.com/chronotope/chrono/issues/1349#event-11765363286) <!-- 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. --> # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - [X] `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - [X] `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - [X] `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)) - [X] `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 > ``` # 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. --> |
||
dependabot[bot]
|
68a3d7c430
|
Bump trash from 3.2.1 to 3.3.1 (#11894)
Bumps [trash](https://github.com/ArturKovacs/trash) from 3.2.1 to 3.3.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/ArturKovacs/trash/releases">trash's releases</a>.</em></p> <blockquote> <h2>v3.3.1</h2> <h3>Bug Fixes</h3> <ul> <li>Use <code>AtomicI32</code> instead of I64 for compatibility with <code>armel</code></li> </ul> <h3>Commit Statistics</h3> <ul> <li>1 commit contributed to the release.</li> <li>2 days passed between releases.</li> <li>1 commit was understood as <a href="https://www.conventionalcommits.org">conventional</a>.</li> <li>1 unique issue was worked on: <a href="https://redirect.github.com/ArturKovacs/trash/issues/99">#99</a></li> </ul> <h3>Commit Details</h3> <!-- raw HTML omitted --> <!-- raw HTML omitted --> <ul> <li><strong><a href="https://redirect.github.com/ArturKovacs/trash/issues/99">#99</a></strong> <ul> <li>Use <code>AtomicI32</code> instead of I64 for compatibility with <code>armel</code> (98049f1)</li> </ul> </li> </ul> <!-- raw HTML omitted --> <h2>v3.3.0</h2> <h3>New Features</h3> <ul> <li>improved error granularity Inform about operating-system specific errors more clearly, thus avoid degenerating error information.</li> </ul> <h3>Bug Fixes</h3> <ul> <li>Use <code>AtomicI32</code> in tests for compatibility with <code>armel</code> platform</li> </ul> <h3>Commit Statistics</h3> <ul> <li>5 commits contributed to the release over the course of 5 calendar days.</li> <li>25 days passed between releases.</li> <li>2 commits were understood as <a href="https://www.conventionalcommits.org">conventional</a>.</li> <li>1 unique issue was worked on: <a href="https://redirect.github.com/ArturKovacs/trash/issues/99">#99</a></li> </ul> <h3>Commit Details</h3> <!-- raw HTML omitted --> <!-- raw HTML omitted --> <ul> <li><strong><a href="https://redirect.github.com/ArturKovacs/trash/issues/99">#99</a></strong> <ul> <li>Use <code>AtomicI32</code> in tests for compatibility with <code>armel</code> platform (920ff0c)</li> </ul> </li> <li><strong>Uncategorized</strong> <ul> <li>Improved error granularity (452be83)</li> <li>Removed tracing. (2b1c9fa)</li> </ul> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/Byron/trash-rs/blob/master/CHANGELOG.md">trash's changelog</a>.</em></p> <blockquote> <h2>3.3.1 (2024-02-12)</h2> <h3>Bug Fixes</h3> <ul> <li><!-- raw HTML omitted --> Use <code>AtomicI32</code> instead of I64 for compatibility with <code>armel</code></li> </ul> <h3>Commit Statistics</h3> <!-- raw HTML omitted --> <ul> <li>1 commit contributed to the release.</li> <li>2 days passed between releases.</li> <li>1 commit was understood as <a href="https://www.conventionalcommits.org">conventional</a>.</li> <li>1 unique issue was worked on: <a href="https://redirect.github.com/Byron/trash-rs/issues/99">#99</a></li> </ul> <h3>Commit Details</h3> <!-- raw HTML omitted --> <!-- raw HTML omitted --> <ul> <li><strong><a href="https://redirect.github.com/Byron/trash-rs/issues/99">#99</a></strong> <ul> <li>Use <code>AtomicI32</code> instead of I64 for compatibility with <code>armel</code> (<a href=" |
||
dependabot[bot]
|
a4ef7c1ac4
|
Bump fancy-regex from 0.12.0 to 0.13.0 (#11893)
[//]: # (dependabot-start) ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps [fancy-regex](https://github.com/fancy-regex/fancy-regex) from 0.12.0 to 0.13.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/fancy-regex/fancy-regex/releases">fancy-regex's releases</a>.</em></p> <blockquote> <h2>0.13.0</h2> <h3>Added</h3> <ul> <li>Support for relative backreferences using <code>\k<-1></code> (-1 references the previous group) (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/121">#121</a>)</li> <li>Add <code>try_replacen</code> to <code>Regex</code> which returns a <code>Result</code> instead of panicking when matching errors (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/130">#130</a>)</li> </ul> <h3>Changed</h3> <ul> <li>Switch from regex crate to regex-automata and regex-syntax (lower level APIs) to simplify internals (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/121">#121</a>)</li> <li>Allow escaping some letters in character classes, e.g. <code>[\A]</code> used to error but now matches the same as <code>[A]</code> (for compatibility with Oniguruma)</li> <li>MSRV (minimum supported Rust version) is now 1.66.1 (from 1.61.0)</li> </ul> <h3>Fixed</h3> <ul> <li>Fix index out of bounds panic when parsing unclosed <code>(?(</code> (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/125">#125</a>)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/fancy-regex/fancy-regex/blob/main/CHANGELOG.md">fancy-regex's changelog</a>.</em></p> <blockquote> <h2>[0.13.0] - 2023-12-22</h2> <h3>Added</h3> <ul> <li>Support for relative backreferences using <code>\k<-1></code> (-1 references the previous group) (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/121">#121</a>)</li> <li>Add <code>try_replacen</code> to <code>Regex</code> which returns a <code>Result</code> instead of panicking when matching errors (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/130">#130</a>)</li> </ul> <h3>Changed</h3> <ul> <li>Switch from regex crate to regex-automata and regex-syntax (lower level APIs) to simplify internals (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/121">#121</a>)</li> <li>Allow escaping some letters in character classes, e.g. <code>[\A]</code> used to error but now matches the same as <code>[A]</code> (for compatibility with Oniguruma)</li> <li>MSRV (minimum supported Rust version) is now 1.66.1 (from 1.61.0)</li> </ul> <h3>Fixed</h3> <ul> <li>Fix index out of bounds panic when parsing unclosed <code>(?(</code> (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/125">#125</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
dependabot[bot]
|
6a1691f378
|
Bump miette from 7.0.0 to 7.1.0 (#11892)
Bumps [miette](https://github.com/zkat/miette) from 7.0.0 to 7.1.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/zkat/miette/releases">miette's releases</a>.</em></p> <blockquote> <h2>v7.1.0</h2> <h3>Features</h3> <ul> <li><strong>derive:</strong> enable more boxed types to be #[diagnostic_source] (<a href="https://redirect.github.com/zkat/miette/issues/338">#338</a>) (<a href=" |
||
dependabot[bot]
|
a71abdaf15
|
Bump serial_test from 2.0.0 to 3.0.0 (#11890)
Bumps [serial_test](https://github.com/palfrey/serial_test) from 2.0.0 to 3.0.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/palfrey/serial_test/releases">serial_test's releases</a>.</em></p> <blockquote> <h2>v3.0.0</h2> <h2>What's Changed</h2> <ul> <li>Multi key support <a href="https://redirect.github.com/palfrey/serial_test/pull/102">palfrey/serial_test#102</a> <ul> <li>Attributes like <code>#[serial(one, two)]</code> are now supported (for all attributes)</li> <li>This is a breaking change, as <code>file_serial</code> paths now need to be done separately <code>#[file_serial(key, path => "/tmp/foo")]</code></li> </ul> </li> <li>Attributes at a mod-level <a href="https://redirect.github.com/palfrey/serial_test/pull/104">palfrey/serial_test#104</a> <ul> <li>You can set any of the attributes on a <code>mod</code> and all <code>#[test]</code> fn's in that mod will have the attribute applied.</li> </ul> </li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/palfrey/serial_test/compare/v2.0.0...v3.0.0">https://github.com/palfrey/serial_test/compare/v2.0.0...v3.0.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
dependabot[bot]
|
1350f1eff7
|
Bump unicode-segmentation from 1.10.1 to 1.11.0 (#11891)
Bumps [unicode-segmentation](https://github.com/unicode-rs/unicode-segmentation) from 1.10.1 to 1.11.0. <details> <summary>Commits</summary> <ul> <li><a href=" |
||
Darren Schroeder
|
360ebeb0bc
|
update to the latest reedline and rusqlite (#11878)
# Description This updates nushell to the latest reedline and rusqlite dependencies. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> # 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 > ``` --> # 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. --> |
||
Stefan Holderbach
|
7f1e025cc9
|
Bump roxmltree to 0.19 (#11876)
Manual changes to adapt to new error variants. Error text adapted from docs. Supersedes #11605 |
||
Stefan Holderbach
|
1b220815b9
|
Bump calamine to 0.24 (#11874)
# Description Update `DataType` to `Data` enum due to breaking change Supersedes #11834 # User-Facing Changes None obvious |
||
dependabot[bot]
|
317653d5d2
|
Bump which from 5.0.0 to 6.0.0 (#11832) | ||
Justin Ma
|
c68324762d
|
Upgrade openssl-src to fix riscv64 target building error (#11861)
Upgrade openssl-src to fix riscv64 target building error Workflow Test: https://github.com/nushell/nightly/actions/runs/7914366860 |
||
nibon7
|
da4c918392
|
Bump polars from 0.36 to 0.37 (#11848)
# Description Bump polars from 0.36 to 0.37 # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> # 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 > ``` --> # 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. --> |
||
Darren Schroeder
|
db4b3a561d
|
update to latest reedline (#11844)
# Description This fixes a panic with the text selection. Reference https://github.com/nushell/reedline/pull/751 https://github.com/nushell/reedline/issues/750 https://github.com/nushell/reedline/pull/689#issuecomment-1934813606 # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> # 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 > ``` --> # 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. --> |