mirror of
https://github.com/nushell/nushell.git
synced 2025-01-31 02:32:55 +01:00
3f5ebd75b6
1620 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Yash Thakur
|
75105033b2
|
Use nucleo instead of skim for completions (#14846)
# Description This PR replaces `SkimMatcherV2` from the [fuzzy-matcher](https://docs.rs/fuzzy-matcher/latest/fuzzy_matcher/) crate with the [nucleo-matcher](https://docs.rs/nucleo-matcher/latest/nucleo_matcher/) crate for doing fuzzy matching. This touches both our completion code in `nu-cli` and symbol filtering in `nu-lsp`. Nucleo should give us better performance than Skim. In the event that we decide to use the Nucleo frontend ([crate docs](https://docs.rs/nucleo/latest/nucleo/)) too, it also works on Windows, unlike [Skim](https://github.com/skim-rs/skim), which appears to only support Linux and MacOS. Unfortunately, we still have an indirect dependency on `fuzzy-matcher`, because the [`dialoguer`](https://github.com/console-rs/dialoguer) crate uses it. # User-Facing Changes No breaking changes. Suggestions will be sorted differently, because Nucleo uses a different algorithm from Skim for matching/scoring. Hopefully, the new sorting will generally make more sense. # Tests + Formatting In `nu-cli`, modified an existing test, but didn't test performance. I haven't tested `nu-lsp` manually, but existing tests pass. I did manually do `ls /nix/store/<TAB>`, `ls /nix/store/d<TAB>`, etc., but didn't notice Nucleo being faster (my `/nix/store` folder has 34136 items at the time of writing). |
||
zc he
|
d66f8cca40
|
feat(lsp): workspace wide operations: rename/goto references (#14837)
# 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. --> <!-- 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! --> goto reference: <img width="885" alt="image" src="https://github.com/user-attachments/assets/6f85cd10-0c2d-46b2-b99e-47a9bbf90822" /> rename: <img width="483" alt="image" src="https://github.com/user-attachments/assets/828e7586-c2b7-414d-9085-5188b10f5f5f" /> Caveats: 1. Module reference/rename is not supported yet 2. names in `use` command should also be renamed, which is not handled now 3. workspace wide actions can be time-consuming, as it requires parsing of all `**/*.nu` files in the workspace (if its text contains the name). Added a progress bar for such requests. 4. In case these requests are triggered accidentally in a root folder with a large depth, I hard-coded the max depth to search to 5 right now. # 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 toolkit.nu; toolkit test stdlib"` 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 > ``` --> Limited test cases # 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. --> |
||
132ikl
|
06938659d2
|
Remove required positional arguments from run-external and exec (#14765)
# Description This PR removes the required positional argument from `run-external` and `exec` in favor of the rest arguments, meaning lists of external commands can be spread directly into `run-external` and `exec`. This does have the drawback of making calling `run-external` and `exec` with no arguments a run-time error rather than a parse error, but I don't imagine that is an issue. Before (for both `run-external` and `exec`): ```nushell run-external # => Error: nu::parser::missing_positional # => # => × Missing required positional argument. # => ╭─[entry #9:1:13] # => 1 │ run-external # => ╰──── # => help: Usage: run-external <command> ...(args) . Use `--help` for more # => information. let command = ["cat" "hello.txt"] run-external ...$command # => Error: nu::parser::missing_positional # => # => × Missing required positional argument. # => ╭─[entry #11:1:14] # => 1 │ run-external ...$command # => · ▲ # => · ╰── missing command # => ╰──── # => help: Usage: run-external <command> ...(args) . Use `--help` for more # => information. run-external ($command | first) ...($command | skip 1) # => hello world! ``` After (for both `run-external` and `exec`): ```nushell run-external # => Error: nu:🐚:missing_parameter # => # => × Missing parameter: no command given. # => ╭─[entry #2:1:1] # => 1 │ run-external # => · ──────┬───── # => · ╰── missing parameter: no command given # => ╰──── # => let command = ["cat" "hello.txt"] run-external ...$command # => hello world! ``` # User-Facing Changes Lists can now be spread directly into `run-external` and `exec`: ```nushell let command = [cat hello.txt] run-external ...$command # => hello world! ``` # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting N/A |
||
dependabot[bot]
|
b99a8c9d80
|
Bump tokio from 1.42.0 to 1.43.0 (#14829)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.42.0 to 1.43.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tokio-rs/tokio/releases">tokio's releases</a>.</em></p> <blockquote> <h2>Tokio v1.43.0</h2> <h1>1.43.0 (Jan 8th, 2025)</h1> <h3>Added</h3> <ul> <li>net: add <code>UdpSocket::peek</code> methods (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7068">#7068</a>)</li> <li>net: add support for Haiku OS (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7042">#7042</a>)</li> <li>process: add <code>Command::into_std()</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7014">#7014</a>)</li> <li>signal: add <code>SignalKind::info</code> on illumos (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6995">#6995</a>)</li> <li>signal: add support for realtime signals on illumos (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7029">#7029</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>io: don't call <code>set_len</code> before initializing vector in <code>Blocking</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7054">#7054</a>)</li> <li>macros: suppress <code>clippy::needless_return</code> in <code>#[tokio::main]</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6874">#6874</a>)</li> <li>runtime: fix thread parking on WebAssembly (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7041">#7041</a>)</li> </ul> <h3>Changes</h3> <ul> <li>chore: use unsync loads for <code>unsync_load</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7073">#7073</a>)</li> <li>io: use <code>Buf::put_bytes</code> in <code>Repeat</code> read impl (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7055">#7055</a>)</li> <li>task: drop the join waker of a task eagerly (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6986">#6986</a>)</li> </ul> <h3>Changes to unstable APIs</h3> <ul> <li>metrics: improve flexibility of H2Histogram Configuration (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6963">#6963</a>)</li> <li>taskdump: add accessor methods for backtrace (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6975">#6975</a>)</li> </ul> <h3>Documented</h3> <ul> <li>io: clarify <code>ReadBuf::uninit</code> allows initialized buffers as well (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7053">#7053</a>)</li> <li>net: fix ambiguity in <code>TcpStream::try_write_vectored</code> docs (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7067">#7067</a>)</li> <li>runtime: fix <code>LocalRuntime</code> doc links (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7074">#7074</a>)</li> <li>sync: extend documentation for <code>watch::Receiver::wait_for</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7038">#7038</a>)</li> <li>sync: fix typos in <code>OnceCell</code> docs (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7047">#7047</a>)</li> </ul> <p><a href="https://redirect.github.com/tokio-rs/tokio/issues/6874">#6874</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/6874">tokio-rs/tokio#6874</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/6963">#6963</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/6963">tokio-rs/tokio#6963</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/6975">#6975</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/6975">tokio-rs/tokio#6975</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/6986">#6986</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/6986">tokio-rs/tokio#6986</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/6995">#6995</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/6995">tokio-rs/tokio#6995</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7014">#7014</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7014">tokio-rs/tokio#7014</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7029">#7029</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7029">tokio-rs/tokio#7029</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7038">#7038</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7038">tokio-rs/tokio#7038</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7041">#7041</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7041">tokio-rs/tokio#7041</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7042">#7042</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7042">tokio-rs/tokio#7042</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7047">#7047</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7047">tokio-rs/tokio#7047</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7053">#7053</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7053">tokio-rs/tokio#7053</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7054">#7054</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7054">tokio-rs/tokio#7054</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7055">#7055</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7055">tokio-rs/tokio#7055</a></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
dependabot[bot]
|
b34547334a
|
Bump data-encoding from 2.6.0 to 2.7.0 (#14831)
Bumps [data-encoding](https://github.com/ia0/data-encoding) from 2.6.0 to 2.7.0. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/ia0/data-encoding/commits">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=data-encoding&package-manager=cargo&previous-version=2.6.0&new-version=2.7.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> |
||
dependabot[bot]
|
d9bfcb4c09
|
Bump uuid from 1.11.0 to 1.12.0 (#14830)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.11.0 to 1.12.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.12.0</h2> <h2>What's Changed</h2> <ul> <li>feat: Add <code>NonZeroUuid</code> type for optimized <code>Option<Uuid></code> representation by <a href="https://github.com/ab22593k"><code>@ab22593k</code></a> in <a href="https://redirect.github.com/uuid-rs/uuid/pull/779">uuid-rs/uuid#779</a></li> <li>Finalize <code>NonNilUuid</code> by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/uuid-rs/uuid/pull/783">uuid-rs/uuid#783</a></li> <li>Prepare for 1.12.0 release by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/uuid-rs/uuid/pull/784">uuid-rs/uuid#784</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/ab22593k"><code>@ab22593k</code></a> made their first contribution in <a href="https://redirect.github.com/uuid-rs/uuid/pull/779">uuid-rs/uuid#779</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/uuid-rs/uuid/compare/1.11.1...1.12.0">https://github.com/uuid-rs/uuid/compare/1.11.1...1.12.0</a></p> <h2>1.11.1</h2> <h2>What's Changed</h2> <ul> <li>Finish cut off docs by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/uuid-rs/uuid/pull/777">uuid-rs/uuid#777</a></li> <li>Fix links in CONTRIBUTING.md by <a href="https://github.com/jacobggman"><code>@jacobggman</code></a> in <a href="https://redirect.github.com/uuid-rs/uuid/pull/778">uuid-rs/uuid#778</a></li> <li>Update rust toolchain before building by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/uuid-rs/uuid/pull/781">uuid-rs/uuid#781</a></li> <li>Prepare for 1.11.1 release by <a href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a href="https://redirect.github.com/uuid-rs/uuid/pull/782">uuid-rs/uuid#782</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/jacobggman"><code>@jacobggman</code></a> made their first contribution in <a href="https://redirect.github.com/uuid-rs/uuid/pull/778">uuid-rs/uuid#778</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/uuid-rs/uuid/compare/1.11.0...1.11.1">https://github.com/uuid-rs/uuid/compare/1.11.0...1.11.1</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
Darren Schroeder
|
8ce14a7c86
|
replace icons in grid with devicons + color (#14827)
# Description This PR replaces the home-grown icons in the `grid` command with the `devicons` crate. ### Before ![image](https://github.com/user-attachments/assets/05e8de84-1655-45b9-ab88-40b8faa0d950) ### After ![image](https://github.com/user-attachments/assets/2134e92d-fba8-41f7-a630-fd83c0a9449c) # 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 toolkit.nu; toolkit test stdlib"` 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
|
737ea3940e
|
finish removing terminal_size dep (#14819)
# Description This PR is a follow on to https://github.com/nushell/nushell/pull/14423 and finishes removing the `terminal_size` crate in favor of `crossterm`'s `size()`. # 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 toolkit.nu; toolkit test stdlib"` 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. --> |
||
zc he
|
3f8dd1b705
|
feat(lsp): document_symbols and workspace_symbols (#14770)
<!-- 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 adds symbols related features to lsp <img width="940" alt="image" src="https://github.com/user-attachments/assets/aeaed338-133c-430a-b966-58a9bc445211" /> Notice that symbols of type variable may got filtered by client side plugins <img width="906" alt="image" src="https://github.com/user-attachments/assets/e031b3dc-443a-486f-8a35-4415c07196d0" /> # 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 toolkit.nu; toolkit test stdlib"` 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]
|
f360489f1e
|
Bump tempfile from 3.14.0 to 3.15.0 (#14777)
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.14.0 to 3.15.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.15.0</h2> <p>Re-seed the per-thread RNG from system randomness when we repeatedly fail to create temporary files (<a href="https://redirect.github.com/Stebalien/tempfile/issues/314">#314</a>). This resolves a potential DoS vector (<a href="https://redirect.github.com/Stebalien/tempfile/issues/178">#178</a>) while avoiding <code>getrandom</code> in the common case where it's necessary. The feature is optional but enabled by default via the <code>getrandom</code> feature.</p> <p>For libc-free builds, you'll either need to disable this feature or opt-in to a different <a href="https://github.com/rust-random/getrandom?tab=readme-ov-file#opt-in-backends"><code>getrandom</code> backend</a>.</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
dependabot[bot]
|
cc4d4acc6b
|
Bump git2 from 0.19.0 to 0.20.0 (#14776) | ||
zc he
|
b5ff46db6a
|
feat(lsp): use lsp-textdocument to handle utf16 position (#14742)
<!-- 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 replaces `ropey` with `lsp-textdocument` for easier utf16 position handling. As a side effect, if fixes the following crashing bug: 1. create a `foo.nu` file with errors in it 2. in `bar.nu`, add code `use foo.nu *` # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> * <s>Diagnostics are now triggered only with document open/save, that's my personal preference. Changing back to previous behavior is easy if you guys have other concerns.</s> * UTF-8 position encoding is not supported by lsp-textdocument, but that's not an issue, since the previous utf-8 ropey implementation is buggy when used in real scenarios in a text editor. # 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 toolkit.nu; toolkit test stdlib"` 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 > ``` --> No new tests added, removed some utf-8 related ones. # 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. --> |
||
Yash Thakur
|
62bd6fe08b
|
Create nu_glob::is_glob function (#14717)
# Description Adds an `is_glob` function to the nu-glob crate that takes a string pattern and returns whether or not it's a glob that would be expanded by nu-glob. Right now, this just means checking if it contains `*`, `?`, or `[`. Previously, this same code was duplicated in the following places: - `ls`: Determining whether to read a folder's contents or expand a glob - `run_external.rs` in nu-command: Arguments to externals only have n-dots and tilde expansion applied if they weren't globs - `glob_from` in nu-engine: - `glob_from` can get the prefix in a simpler way for non-globs - If the canonical path for a non-glob path contains glob metacharacters, it needs to be escaped - `completion_common.rs` in nu-cli: File/folder completions containing glob metacharacters need to be wrapped in quotes All of these locations can use `nu_glob::is_glob` now instead of rolling their own checks. This does mean that nu-cli now has a dependency on nu-glob. # User-Facing Changes Users of nu-glob will now be able to check if a given pattern is a glob expanded by nu-glob. For users of Nushell, completion suggestions for files containing `]` will no longer be wrapped in quotes if they contain no other glob metacharacters. This is because unmatched `]`s are ignored by nu-glob, but we used to consider such file completions contaminated anyway. # Tests + Formatting This is a very basic function, so I just added some doctests. # After Submitting This is meant to be used in https://github.com/nushell/nushell/pull/14674. |
||
Darren Schroeder
|
f69b22f00b
|
replace regex crate with fancy_regex (#14646)
# Description We removed the regex crate long ago but there were a few instances where we could not remove it because fancy-regex did not have a split/splitn, and maybe other functions. Those functions now exist in the latest fancy-regex crate so we can now remove it. # 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 toolkit.nu; toolkit test stdlib"` 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. --> |
||
Maxim Zhiburt
|
4401924128
|
Bump tabled to 0.17 (#14415)
With this comes a new `unicode-width` as I remember there was some issue
with `ratatui`.
And a bit of refactorings which are ment to reduce code lines while not
breaking anything.
Not yet complete, I think I'll try to improve some more places,
just wanted to trigger CI 😄
And yessssssssss we have a new `unicode-width` but I sort of doubtful,
I mean the original issue with emojie.
I think it may require an additional "clean" call.
I am just saying I was not testing it with that case of complex emojies.
---------
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
|
||
Rikuki IX
|
6ebc0fc3ff
|
Switch from serde_yaml to serde_yml (#14630)
# Description This PR fixes #14339. Since [serde_yaml](https://docs.rs/serde_yaml/latest/serde_yaml/) is already deprecated, replaced it with [serde_yml](https://doc.serdeyml.com/serde_yml/). After this change, the `to yaml` boolean parsing issue in #14339 is also fixed. Now the command ``` ['y' 'Y' 'yes' 'Yes' 'YES' 'n' 'N' 'no' 'No' 'No' 'on' 'On' 'ON' 'off' 'Off' 'OFF'] | to yaml ``` will return ``` - 'y' - 'Y' - 'yes' - 'Yes' - 'YES' - 'n' - 'N' - 'no' - 'No' - 'No' - 'on' - 'On' - 'ON' - 'off' - 'Off' - 'OFF' ``` # User-Facing Changes I'm not sure if the yaml spec change is a user-facing change. |
||
Bahex
|
469e23cae4
|
Add bytes split command (#14652)
Related #10708 # Description Add `bytes split` command. `bytes split` splits its input on the provided separator on binary values _and_ binary streams without collecting. The separator can be a multiple character string or multiple byte binary. It can be used when neither `split row` (not streaming over raw input) nor `lines` (streaming, but can only split on newlines) is right. The backing iterator implemented in this PR, `SplitRead`, can be used to implement a streaming `split row` in the future. # User-Facing Changes `bytes split` command added, which can be used to split binary values and raw streams using a separator. # Tests + Formatting - 🟢 toolkit fmt - 🟢 toolkit clippy - 🟢 toolkit test - 🟢 toolkit test stdlib # After Submitting Mention in release notes. |
||
Jack Wright
|
23ba613b00
|
Polars AWS S3 support (#14648)
# Description Provides Amazon S3 support. - Utilizes your existing AWS cli configuration. - Supports AWS SSO - Supports [gimme-aws-creds](https://github.com/Nike-Inc/gimme-aws-creds). - respects the settings of AWS_PROFILE environment variable for selecting profile config - AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION environment variables for configuring without an AWS config Usage: ```nushell polars open s3://bucket/and/path.parquet ``` Supports: - CSV - Parquet - NDJSON / json lines - Arrow Doesn't support: - eager dataframes - Avro - JSON |
||
Piepmatz
|
4b1f4e63c3
|
Replace std::time::Instant with web_time::Instant (#14668)
# Description The `std::time::Instant` type panics in the WASM context. To prevent this, I replaced all uses of `std::time::Instant` in WASM-relevant crates with `web_time::Instant`. This ensures commands using `Instant` work in WASM without issues. For non-WASM targets, `web-time` simply reexports `std::time`, so this change doesn’t affect regular builds ([docs](https://docs.rs/web-time/latest/web_time/)). To ensure future code doesn't reintroduce `std::time::Instant` in WASM contexts, I added a `clippy wasm` command to the toolkit. This runs `cargo clippy` with a `clippy.toml` configured to disallow `std::time::Instant`. Since `web-time` aliases `std::time` by default, the `clippy.toml` is stored in `clippy/wasm` and is only loaded when targeting WASM. I also added a new CI job that tests this too. # User-Facing Changes None. |
||
Stefan Holderbach
|
d3cbcf401f
|
Bump version to 0.101.1 (#14661)
|
||
Stefan Holderbach
|
fb26109049
|
Bump version for 0.101.0 release (#14631)
It's palindromic! |
||
Stefan Holderbach
|
5139054325
|
Pin reedline to 0.38.0 release (#14651) | ||
Darren Schroeder
|
8f4feeb119
|
add config flatten command (#14621)
# Description This is supposed to be a Quality-of-Life command that just makes some things easier when dealing with a nushell config. Really all it does is show you the current config in a flattened state. That's it. I was thinking this could be useful when comparing config settings between old and new config files. There are still room for improvements. For instance, closures are listed as an int. They can be updated with a `view source <int>` pipeline but that could all be built in too. ![image](https://github.com/user-attachments/assets/5d8981a3-8d03-4eb3-8361-2f3c3c560660) The command works by getting the current configuration, serializing it to json, then flattening that json. BTW, there's a new flatten_json.rs in nu-utils. Theoretically all this mess could be done in a custom command script, but it's proven to be exceedingly difficult based on the work from discord. Here's some more complex items to flatten. ![image](https://github.com/user-attachments/assets/b44e2ec8-cf17-41c4-bf8d-7f26317db071) # 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 toolkit.nu; toolkit test stdlib"` 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. --> |
||
Wind
|
fff0c6e2cb
|
update shadow-rs to 0.37 (#14617) | ||
Wind
|
0b96962157
|
run cargo update manually to update dependencies (#14569)
#14556 Seems strange to me, because it downgrade `windows-target` version. So In this pr I tried to update it by hand, and also run `cargo update` manually to see how it goes |
||
dependabot[bot]
|
4f20c370f9
|
Bump scraper from 0.21.0 to 0.22.0 (#14557)
Bumps [scraper](https://github.com/causal-agent/scraper) from 0.21.0 to 0.22.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>v0.22.0</h2> <h2>What's Changed</h2> <ul> <li>Make current nightly version of Clippy happy. by <a href="https://github.com/adamreichold"><code>@adamreichold</code></a> in <a href="https://redirect.github.com/rust-scraper/scraper/pull/220">rust-scraper/scraper#220</a></li> <li>RFC: Drop hash table for per-element attributes for more compact sorted vector by <a href="https://github.com/adamreichold"><code>@adamreichold</code></a> in <a href="https://redirect.github.com/rust-scraper/scraper/pull/221">rust-scraper/scraper#221</a></li> <li>Bump ego-tree to version 0.10.0 by <a href="https://github.com/cfvescovo"><code>@cfvescovo</code></a> in <a href="https://redirect.github.com/rust-scraper/scraper/pull/222">rust-scraper/scraper#222</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/rust-scraper/scraper/compare/v0.21.0...v0.22.0">https://github.com/rust-scraper/scraper/compare/v0.21.0...v0.22.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
Darren Schroeder
|
685dc78739
|
update to reedline 9eb3c2d (#14541)
# Description This PR updates nushell to the latest commit of reedline that fixes some rendering issues on window resize. # 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 toolkit.nu; toolkit test stdlib"` 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. --> |
||
Ben Beasley
|
05b7c1fffa
|
Update roxmltree from 0.19 to 0.20, the latest version (#14513)
# Description This simply updates `roxmltree` from 0.19.0 to 0.20.0, the latest release, with no code changes required. # User-Facing Changes N/A |
||
dependabot[bot]
|
bf457cd4fc
|
Bump indexmap from 2.6.0 to 2.7.0 (#14505)
Bumps [indexmap](https://github.com/indexmap-rs/indexmap) from 2.6.0 to 2.7.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md">indexmap's changelog</a>.</em></p> <blockquote> <h2>2.7.0 (2024-11-30)</h2> <ul> <li>Added methods <code>Entry::insert_entry</code> and <code>VacantEntry::insert_entry</code>, returning an <code>OccupiedEntry</code> after insertion.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
Michel Lind
|
88a8e986eb
|
Bump titlecase dependency (#14502)
# Description v3 drops the dependency on joinery, as well as on lazy_static. The MSRV is bumped to 1.70.0 but that is still way below what nushell requires. # User-Facing Changes N/A # Tests + Formatting All tests pass (including nu-command which is the direct user) # After Submitting N/A Signed-off-by: Michel Lind <salimma@fedoraproject.org> |
||
dependabot[bot]
|
5f0567f8df
|
Bump multipart-rs from 0.1.11 to 0.1.13 (#14506)
Bumps [multipart-rs](https://github.com/feliwir/multipart-rs) from 0.1.11 to 0.1.13. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/feliwir/multipart-rs/commits">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=multipart-rs&package-manager=cargo&previous-version=0.1.11&new-version=0.1.13)](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> |
||
dependabot[bot]
|
a980b9d0a6
|
Bump ureq from 2.10.1 to 2.12.0 (#14507)
Bumps [ureq](https://github.com/algesten/ureq) from 2.10.1 to 2.12.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/algesten/ureq/blob/main/CHANGELOG.md">ureq's changelog</a>.</em></p> <blockquote> <h1>2.12.0</h1> <ul> <li>Bump MSRV 1.67 -> 1.71 because rustls will soon adopt it (<a href="https://redirect.github.com/algesten/ureq/issues/905">#905</a>)</li> <li>Unpin rustls dep (>=0.23.19) (<a href="https://redirect.github.com/algesten/ureq/issues/905">#905</a>)</li> </ul> <h1>2.11.0</h1> <ul> <li>Fixes for changes to cargo-deny (<a href="https://redirect.github.com/algesten/ureq/issues/882">#882</a>)</li> <li>Pin rustls dep on 0.23.19 to keep MSRV 1.67 (<a href="https://redirect.github.com/algesten/ureq/issues/878">#878</a>)</li> <li>Bump MSRV 1.63 -> 1.67 due to time crate (<a href="https://redirect.github.com/algesten/ureq/issues/878">#878</a>)</li> <li>Re-export rustls (<a href="https://redirect.github.com/algesten/ureq/issues/813">#813</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
dependabot[bot]
|
08504f6e06
|
Bump bytes from 1.8.0 to 1.9.0 (#14508)
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.8.0 to 1.9.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tokio-rs/bytes/releases">bytes's releases</a>.</em></p> <blockquote> <h2>Bytes v1.9.0</h2> <h1>1.9.0 (November 27, 2024)</h1> <h3>Added</h3> <ul> <li>Add <code>Bytes::from_owner</code> to enable externally-allocated memory (<a href="https://redirect.github.com/tokio-rs/bytes/issues/742">#742</a>)</li> </ul> <h3>Documented</h3> <ul> <li>Fix typo in Buf::chunk() comment (<a href="https://redirect.github.com/tokio-rs/bytes/issues/744">#744</a>)</li> </ul> <h3>Internal changes</h3> <ul> <li>Replace BufMut::put with BufMut::put_slice in Writer impl (<a href="https://redirect.github.com/tokio-rs/bytes/issues/745">#745</a>)</li> <li>Rename hex_impl! to fmt_impl! and reuse it for fmt::Debug (<a href="https://redirect.github.com/tokio-rs/bytes/issues/743">#743</a>)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md">bytes's changelog</a>.</em></p> <blockquote> <h1>1.9.0 (November 27, 2024)</h1> <h3>Added</h3> <ul> <li>Add <code>Bytes::from_owner</code> to enable externally-allocated memory (<a href="https://redirect.github.com/tokio-rs/bytes/issues/742">#742</a>)</li> </ul> <h3>Documented</h3> <ul> <li>Fix typo in Buf::chunk() comment (<a href="https://redirect.github.com/tokio-rs/bytes/issues/744">#744</a>)</li> </ul> <h3>Internal changes</h3> <ul> <li>Replace BufMut::put with BufMut::put_slice in Writer impl (<a href="https://redirect.github.com/tokio-rs/bytes/issues/745">#745</a>)</li> <li>Rename hex_impl! to fmt_impl! and reuse it for fmt::Debug (<a href="https://redirect.github.com/tokio-rs/bytes/issues/743">#743</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
Ben Beasley
|
a70e77ba48
|
Update procfs and which dependencies to their latest releases (#14489)
# Description This simply updates `procfs` from 0.16.0 to 0.17.0 and `which` from 6.0 to 7.0 – in each case, to the latest release – with no code changes required. # Notes The release notes for `procfs` 0.17.0 are at https://github.com/eminence/procfs/releases/tag/v0.17.0. The release notes for `which` 7.0.0 are at https://github.com/harryfei/which-rs/releases/tag/7.0.0. |
||
Bahex
|
dfec687a46
|
term query : refactor, add --beginning flag (#14446)
# Description - Refactor code to be simpler. - Make the mentioned changes. - `scopeguard` is added as a direct dependency. Helps simplify the code. Rather than roll an ad-hoc version of it myself, I thought it would be better to use `scopeguard` as it was already an indirect dependency. # User-Facing Changes - Add `--beginning` flag, which is used to validate the response and provide early errors in case of unexpected inputs. - Both `terminator` and `beginning` sequences (when provided) are not included in the command's output. Turns out they are almost always removed from the output, and because they are known beforehand they can be added back by the user. |
||
Piepmatz
|
3d5f853b03
|
Start to Add WASM Support Again (#14418)
<!-- 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. --> The [nushell/demo](https://github.com/nushell/demo) project successfully demonstrated running Nushell in the browser using WASM. However, the current version of Nushell cannot be easily built for the `wasm32-unknown-unknown` target, the default for `wasm-bindgen`. This PR introduces initial support for the `wasm32-unknown-unknown` target by disabling OS-dependent features such as filesystem access, IO, and platform/system-specific functionality. This separation is achieved using a new `os` feature in the following crates: - `nu-cmd-lang` - `nu-command` - `nu-engine` - `nu-protocol` The `os` feature includes all functionality that interacts with an operating system. It is enabled by default, but can be disabled using `--no-default-features`. All crates that depend on these core crates now use `--no-default-features` to allow compilation for WASM. To demonstrate compatibility, the following script builds all crates expected to work with WASM. Direct user interaction, running external commands, working with plugins, and features requiring `openssl` are out of scope for now due to their complexity or reliance on C libraries, which are difficult to compile and link in a WASM environment. ```nushell [ # compatible crates "nu-cmd-base", "nu-cmd-extra", "nu-cmd-lang", "nu-color-config", "nu-command", "nu-derive-value", "nu-engine", "nu-glob", "nu-json", "nu-parser", "nu-path", "nu-pretty-hex", "nu-protocol", "nu-std", "nu-system", "nu-table", "nu-term-grid", "nu-utils", "nuon" ] | each {cargo build -p $in --target wasm32-unknown-unknown --no-default-features} ``` ## Caveats This PR has a few caveats: 1. **`miette` and `terminal-size` Dependency Issue** `miette` depends on `terminal-size`, which uses `rustix` when the target is not Windows. However, `rustix` requires `std::os::unix`, which is unavailable in WASM. To address this, I opened a [PR](https://github.com/eminence/terminal-size/pull/68) for `terminal-size` to conditionally compile `rustix` only when the target is Unix. For now, the `Cargo.toml` includes patches to: - Use my forked version of `terminal-size`. - ~~Use an unreleased version of `miette` that depends on `terminal-size@0.4`.~~ These patches are temporary and can be removed once the upstream changes are merged and released. 2. **Test Output Adjustments** Due to the slight bump in the `miette` version, one test required adjustments to accommodate minor formatting changes in the error output, such as shifted newlines. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> This shouldn't break anything but allows using some crates for targeting `wasm32-unknown-unknown` to revive the demo page eventually. # 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 toolkit.nu; toolkit test stdlib"` 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 > ``` --> - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` I did not add any extra tests, I just checked that compiling works, also when using the host target but unselecting the `os` feature. # 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. --> ~~Breaking the wasm support can be easily done by adding some `use`s or by adding a new dependency, we should definitely add some CI that also at least builds against wasm to make sure that building for it keep working.~~ I added a job to build wasm. --------- Co-authored-by: Ian Manske <ian.manske@pm.me> |
||
Jack Wright
|
0172ad8461
|
Upgrading to polars 0.44 (#14478)
Upgrading to polars 0.44 |
||
Wind
|
6e036ca09a
|
update unicode-width to 0.2 (#14456)
# Description When looking into #14395, I found that `unicode-width` from 0.1 to 0.2 contains a breaking change, the mainly change is it treats newlines as width 1. So relative tests(str stats) are broken. But I think it's ok to adjust the test. # User-Facing Changes The output of `str stats` might change if there are `\n` in the input. ### Before ```nushell > "a\nb" | str stats | get unicode-width 2 ``` ### After ```nushell > "a\nb" | str stats | get unicode-width 3 ``` # Tests + Formatting Adjusted 2 tests. # After Submitting NaN |
||
Wind
|
a13a024ac8
|
update miette to 7.3 (#14454)
# Description The test is failed when updating miette from 7.2 to 7.3. After looking into the test, I think it's ok to adjust test. # User-Facing Changes For the given custom command: ```nushell def force_error [ x: any ] { error make { msg: "oh no!" label: { text: "here's the error" span: (metadata $x).span } } } ``` ### Before ``` > force_error "My error" Error: × oh no! ╭─[entry #8:1:13] 1 │ force_error "My error" · ─────┬──── · ╰── here's the error ╰──── ``` ### After ``` > force_error "My error" Error: × oh no! ╭─[entry #9:1:13] 1 │ force_error "My error" · ─────┬──── · ╰── here's the error ╰──── ``` As we can see, the message `oh no!` is output in a new line, and there is one less trailing line. I have makes some testing, and it seems that it only happened on `error make` command. # Tests + Formatting Changed 1 test # After Submitting NaN |
||
Douglas
|
5e7263cd1a
|
Bump reedline to current main (#14455)
# Description @fdncred mentioned that we should be dogfooding the latest Reedline changes in Nushell. Hoping I got the steps correct. # User-Facing Changes New keybindings for: * Insert Newline: <kbd>Alt</kbd>+<kbd>Enter</kbd> and <kbd>Shift</kbd>+<kbd>Enter</kbd> * Enter: <kbd>Ctrl</kbd>+<kbd>J</kbd> # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting |
||
Darren Schroeder
|
dd3a3a2717
|
remove terminal_size crate everywhere it makes sense (#14423)
# Description This PR removes the `terminal_size` crate everywhere that it made sense. I replaced it with crossterm's version called `size`. The places I didn't remove it were the places that did not have a dependency on crossterm. So, I thought it was "cheaper" to have a dep on term_size vs crossterm in those locations. |
||
Marc Schreiber
|
e63976df7e
|
Bump Calamine (#14403)
This commit upgrades calamine in order to benefit from recent developments, e.g. ignore annotations in column headers (see https://github.com/tafia/calamine/pull/467 for reference). |
||
dependabot[bot]
|
1e7840c376
|
Bump terminal_size from 0.3.0 to 0.4.0 (#14393)
Bumps [terminal_size](https://github.com/eminence/terminal-size) from 0.3.0 to 0.4.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/eminence/terminal-size/releases">terminal_size's releases</a>.</em></p> <blockquote> <h2>v0.4.0</h2> <h2>Breaking changes</h2> <p>The big change in this release is the API change in <a href="https://redirect.github.com/eminence/terminal-size/issues/66">#66</a>:</p> <ul> <li>If you were using the <code>terminal_size_using_fd</code> or <code>terminal_size_using_handle</code> functions, these are now deprecated and unsafe. Instead you should use the <code>terminal_size_of</code> function, which does the same thing but is safer.</li> </ul> <h2>What's Changed</h2> <ul> <li>Add <code>rust-version</code> in Cargo.toml by <a href="https://github.com/cgwalters"><code>@cgwalters</code></a> in <a href="https://redirect.github.com/eminence/terminal-size/pull/60">eminence/terminal-size#60</a></li> <li>Update <code>windows-sys</code> to 0.52 by <a href="https://github.com/barrbrain"><code>@barrbrain</code></a> in <a href="https://redirect.github.com/eminence/terminal-size/pull/62">eminence/terminal-size#62</a></li> <li>Update windows-sys to 0.59 by <a href="https://github.com/eminence"><code>@eminence</code></a> in <a href="https://redirect.github.com/eminence/terminal-size/pull/67">eminence/terminal-size#67</a></li> <li>Update the API for I/O safety by <a href="https://github.com/sunfishcode"><code>@sunfishcode</code></a> in <a href="https://redirect.github.com/eminence/terminal-size/pull/66">eminence/terminal-size#66</a></li> <li>Fix typo, link to docs, update docs by <a href="https://github.com/waywardmonkeys"><code>@waywardmonkeys</code></a> in <a href="https://redirect.github.com/eminence/terminal-size/pull/63">eminence/terminal-size#63</a></li> <li>Update CI: Use current actions, remove unused build step by <a href="https://github.com/waywardmonkeys"><code>@waywardmonkeys</code></a> in <a href="https://redirect.github.com/eminence/terminal-size/pull/64">eminence/terminal-size#64</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/cgwalters"><code>@cgwalters</code></a> made their first contribution in <a href="https://redirect.github.com/eminence/terminal-size/pull/60">eminence/terminal-size#60</a></li> <li><a href="https://github.com/barrbrain"><code>@barrbrain</code></a> made their first contribution in <a href="https://redirect.github.com/eminence/terminal-size/pull/62">eminence/terminal-size#62</a></li> <li><a href="https://github.com/waywardmonkeys"><code>@waywardmonkeys</code></a> made their first contribution in <a href="https://redirect.github.com/eminence/terminal-size/pull/63">eminence/terminal-size#63</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/eminence/terminal-size/compare/v0.3.0...v0.4.0">https://github.com/eminence/terminal-size/compare/v0.3.0...v0.4.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
dependabot[bot]
|
a6e3470c6f
|
Bump thiserror from 1.0.69 to 2.0.3 (#14394)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.69 to 2.0.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/dtolnay/thiserror/releases">thiserror's releases</a>.</em></p> <blockquote> <h2>2.0.3</h2> <ul> <li>Support the same Path field being repeated in both Debug and Display representation in error message (<a href="https://redirect.github.com/dtolnay/thiserror/issues/383">#383</a>)</li> <li>Improve error message when a format trait used in error message is not implemented by some field (<a href="https://redirect.github.com/dtolnay/thiserror/issues/384">#384</a>)</li> </ul> <h2>2.0.2</h2> <ul> <li>Fix hang on invalid input inside #[error(...)] attribute (<a href="https://redirect.github.com/dtolnay/thiserror/issues/382">#382</a>)</li> </ul> <h2>2.0.1</h2> <ul> <li>Support errors that contain a dynamically sized final field (<a href="https://redirect.github.com/dtolnay/thiserror/issues/375">#375</a>)</li> <li>Improve inference of trait bounds for fields that are interpolated multiple times in an error message (<a href="https://redirect.github.com/dtolnay/thiserror/issues/377">#377</a>)</li> </ul> <h2>2.0.0</h2> <h2>Breaking changes</h2> <ul> <li> <p>Referencing keyword-named fields by a raw identifier like <code>{r#type}</code> inside a format string is no longer accepted; simply use the unraw name like <code>{type}</code> (<a href="https://redirect.github.com/dtolnay/thiserror/issues/347">#347</a>)</p> <p>This aligns thiserror with the standard library's formatting macros, which gained support for implicit argument capture later than the release of this feature in thiserror 1.x.</p> <pre lang="rust"><code>#[derive(Error, Debug)] #[error("... {type} ...")] // Before: {r#type} pub struct Error { pub r#type: Type, } </code></pre> </li> <li> <p>Trait bounds are no longer inferred on fields whose value is shadowed by an explicit named argument in a format message (<a href="https://redirect.github.com/dtolnay/thiserror/issues/345">#345</a>)</p> <pre lang="rust"><code>// Before: impl<T: Octal> Display for Error<T> // After: impl<T> Display for Error<T> #[derive(Error, Debug)] #[error("{thing:o}", thing = "...")] pub struct Error<T> { thing: T, } </code></pre> </li> <li> <p>Tuple structs and tuple variants can no longer use numerical <code>{0}</code> <code>{1}</code> access at the same time as supplying extra positional arguments for a format message, as this makes it ambiguous whether the number refers to a tuple field vs a different positional arg (<a href="https://redirect.github.com/dtolnay/thiserror/issues/354">#354</a>)</p> <pre lang="rust"><code>#[derive(Error, Debug)] #[error("ambiguous: {0} {}", $N)] // ^^^ Not allowed, use #[error("... {0} {n}", n = $N)] pub struct TupleError(i32); </code></pre> </li> <li> <p>Code containing invocations of thiserror's <code>derive(Error)</code> must now have a direct dependency on the <code>thiserror</code> crate regardless of the error data structure's contents (<a href="https://redirect.github.com/dtolnay/thiserror/issues/368">#368</a>, <a href="https://redirect.github.com/dtolnay/thiserror/issues/369">#369</a>, <a href="https://redirect.github.com/dtolnay/thiserror/issues/370">#370</a>, <a href="https://redirect.github.com/dtolnay/thiserror/issues/372">#372</a>)</p> </li> </ul> <h2>Features</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
dependabot[bot]
|
582b5f45e8
|
Bump shadow-rs from 0.35.2 to 0.36.0 (#14396)
Bumps [shadow-rs](https://github.com/baoyachi/shadow-rs) from 0.35.2 to 0.36.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/baoyachi/shadow-rs/releases">shadow-rs's releases</a>.</em></p> <blockquote> <h2>v0.36.0</h2> <h2>What's Changed</h2> <ul> <li>feat(HookExt): Add extended hook functionality with custom deny lists by <a href="https://github.com/baoyachi"><code>@baoyachi</code></a> in <a href="https://redirect.github.com/baoyachi/shadow-rs/pull/190">baoyachi/shadow-rs#190</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/baoyachi/shadow-rs/compare/v0.35.2...v0.36.0">https://github.com/baoyachi/shadow-rs/compare/v0.35.2...v0.36.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
Michel Lind
|
6e84ba182e
|
Bump quick-xml to 0.37.0 (#14354)
# Description Bump `quick-xml` to `0.37.0`. This came about rebasing `nushell` in Fedora, which now has `quick-xml` 0.36. There is one breaking change in 0.33 as far as `nu-command` is concerned, in that `Event::PI` is now a dedicated `BytesPI` type: https://github.com/tafia/quick-xml/blob/master/Changelog.md#misc-changes-5 I've tested compiling and testing locally with `0.33.0`, `0.36.0` and `0.37.0` - but let's future-proof by requiring `0.37.0`. # User-Facing Changes N/A # Tests + Formatting No additional tests required, existing tests pass # After Submitting N/A Signed-off-by: Michel Lind <salimma@fedoraproject.org> |
||
Darren Schroeder
|
13ce9e4f64
|
update uutils crates (#14371)
# Description This PR updates the uutils/coreutils crates to the latest version. I hard-coded debug to false, a new uu_mv parameter. It may be interesting to add that but I just wanted to get all the uu crates on the same version. I had to update the tests because --no-clobber works but doesn't say anything when it's not clobbering and previously we were checking for an error message. # 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 toolkit.nu; toolkit test stdlib"` 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. --> |
||
Yash Thakur
|
f63f8cb154
|
Add utouch command from uutils/coreutils (#11817)
<!-- 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! --> Part of https://github.com/nushell/nushell/issues/11549 # 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 adds a `utouch` command that uses the `touch` command from https://github.com/uutils/coreutils. Eventually, `utouch` may be able to replace `touch`. The conflicts in Cargo.lock and Cargo.toml are because I'm using the uutils/coreutils main rather than the latest release, since the changes that expose `uu_touch`'s internal functionality aren't available in the latest release. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> Users will have access to a new `utouch` command with the following flags: todo # 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. --> |
||
Ben Beasley
|
7bd801a167
|
Update rstest from 0.18 to 0.23 (the current version) (#14350) | ||
dependabot[bot]
|
636bae2466
|
Bump tempfile from 3.13.0 to 3.14.0 (#14326) |