Commit Graph

1653 Commits

Author SHA1 Message Date
zc he
d122bc3d89
fix: security_audit, bump ring from 0.17.8 to 0.17.13 (#15263)
Fixes this:

<div class="Box p-3 markdown-body f5 mb-4">
          <h2 dir="auto">Vulnerabilities</h2>
<h3 dir="auto"><a
href="https://rustsec.org/advisories/RUSTSEC-2025-0009.html"
rel="nofollow">RUSTSEC-2025-0009</a></h3>
<blockquote>
<p dir="auto">Some AES functions may panic when overflow checking is
enabled.</p>
</blockquote>
<markdown-accessiblity-table data-catalyst=""><table role="table">
<thead>
<tr>
<th>Details</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>Package</td>
<td><code class="notranslate">ring</code></td>
</tr>
<tr>
<td>Version</td>
<td><code class="notranslate">0.17.8</code></td>
</tr>
<tr>
<td>URL</td>
<td><a
href="https://github.com/briansmith/ring/blob/main/RELEASES.md#version-01712-2025-03-05">https://github.com/briansmith/ring/blob/main/RELEASES.md#version-01712-2025-03-05</a></td>
</tr>
<tr>
<td>Date</td>
<td>2025-03-06</td>
</tr>
<tr>
<td>Patched versions</td>
<td><code class="notranslate">&gt;=0.17.12</code></td>
</tr>
</tbody>
</table></markdown-accessiblity-table>
<p dir="auto"><code
class="notranslate">ring::aead::quic::HeaderProtectionKey::new_mask()</code>
may panic when overflow<br>
checking is enabled. In the QUIC protocol, an attacker can induce this
panic by<br>
sending a specially-crafted packet. Even unintentionally it is likely to
occur<br>
in 1 out of every 2**32 packets sent and/or received.</p>
<p dir="auto">On 64-bit targets operations using <code
class="notranslate">ring::aead::{AES_128_GCM, AES_256_GCM}</code>
may<br>
panic when overflow checking is enabled, when encrypting/decrypting
approximately<br>
68,719,476,700 bytes (about 64 gigabytes) of data in a single chunk.
Protocols<br>
like TLS and SSH are not affected by this because those protocols break
large<br>
amounts of data into small chunks. Similarly, most applications will
not<br>
attempt to encrypt/decrypt 64GB of data in one chunk.</p>
<p dir="auto">Overflow checking is not enabled in release mode by
default, but<br>
<code class="notranslate">RUSTFLAGS=&amp;quot;-C
overflow-checks&amp;quot;</code> or <code
class="notranslate">overflow-checks = true</code> in the Cargo.toml<br>
profile can override this. Overflow checking is usually enabled by
default in<br>
debug mode.</p>
        </div>
2025-03-07 08:55:57 -06:00
Ayam Dobhal
f3982278e8
feat(random uuid): add support for uuid versions other than 4. (#15239)
This PR implements the changes proposed in #15112 without any breaking
changes. Should close #15112 post the review.

# Description

Added functionality to generate `uuid` versions 1, 3, 4, 5, 7 instead of
just the version 4.
- Users can now add a `-v n` flag to specify the version of uuid they
want to generate and it maintains backward compatibility by returning a
v4 uuid by default if no flags are passed.
- Versions 3 and 5 have the additional but required namespace (`-s`) and
name (`-n`) arguments too. Version 1 requires a mac address (`-m`).
# User-Facing Changes
- Added support for uuid versions 1, 3, 5 and 7.
- For v3 and v5, the namespace and name arguments are required and hence
there will be an error if those are not passed. Similarly the mac
address for v1.
- Full backward compatibility by setting v4 as default.
# Tests + Formatting

Tests added:
in `nu-command::commands::random`
- generates_valid_uuid4_by_default
- generates_valid_uuid1
- generates_valid_uuid3_with_namespace_and_name
- generates_valid_uuid4
- generates_valid_uuid5_with_namespace_and_name
- generates_valid_uuid7
2025-03-06 14:21:52 +01:00
zc he
7555743ccc
fix(lsp): completion of commands defined after the cursor (#15188)
# Description

Completion feature in LSP can't deal with commands defined after the
cursor before this PR.
This PR adds an alternative completion route where text is not truncated
and no extra `a` appended.

This will also ease future implementation of [signature
help](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_signatureHelp).

# User-Facing Changes

# Tests + Formatting

+6

# After Submitting
2025-03-01 06:21:53 -06:00
zc he
52a35827c7
fix(completion): edge cases of operator completions (#15169)
# Description

Improves the completeness of operator completions.
Check the new test cases for details.

# User-Facing Changes

# Tests + Formatting

+4

# After Submitting
2025-02-28 19:39:59 +01:00
Solomon
c5a14bb8ff
check signals in nu-glob and ls (#15140)
Fixes #10144

# User-Facing Changes

Long running glob expansions and `ls` runs (e.g. `ls /**/*`) can now be
interrupted with ctrl-c.
2025-02-28 19:36:39 +01:00
dependabot[bot]
12b8b4580c
build(deps): bump rust-embed from 8.5.0 to 8.6.0 (#15183)
Bumps [rust-embed](https://github.com/pyros2097/rust-embed) from 8.5.0
to 8.6.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pyrossh/rust-embed/blob/master/changelog.md">rust-embed's
changelog</a>.</em></p>
<blockquote>
<h2>[8.6.0] - 2025-02-25</h2>
<ul>
<li>Update include-flate to 0.3 <a
href="https://redirect.github.com/pyrossh/rust-embed/pull/246">#246</a>.
Thanks to <a href="https://github.com/krant">krant</a></li>
<li>refactor: remove redundant reference and closure <a
href="https://redirect.github.com/pyrossh/rust-embed/pull/250">#250</a>.
Thanks to <a href="https://github.com/hamirmahal">hamirmahal</a></li>
<li>refactor: replace map().unwrap_or_else(). <a
href="https://redirect.github.com/pyrossh/rust-embed/pull/255">#250</a>.
Thanks to <a href="https://github.com/hamirmahal">hamirmahal</a></li>
<li>Compatible with Axum 0.7.9 <a
href="https://redirect.github.com/pyrossh/rust-embed/pull/253">#253</a>.
Thanks to <a href="https://github.com/wkmyws">wkmyws</a></li>
<li>Add allow_missing option to derive macro <a
href="https://redirect.github.com/pyrossh/rust-embed/pull/256">#256</a>.
Thanks to <a href="https://github.com/lirannl">lirannl</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/pyros2097/rust-embed/commits">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rust-embed&package-manager=cargo&previous-version=8.5.0&new-version=8.6.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>
2025-02-26 23:57:10 +08:00
Stefan Holderbach
0cb4281fdb
Bump reedline to latest commit (#15189)
Removes one `itertools` version duplication
2025-02-26 07:45:49 -06:00
Stefan Holderbach
6f6ad23072
Bump ratatui to 0.29.0 (#15187)
This is the most recent version

Deduplicates the `crossterm` dependency, brings `itertools` in line with
the majority of dependencies.

In the fight against compile times this sadly introduces a
proc-macro-crate for writing proc-macros (`darling`) as a transitive
dependency. So may not lead to a compile time improvement (or could make
it even slightly worse)

Observation: Cargo changed the `Cargo.lock` file version when running
this. (this should still be the specified toolchain, so don't expect a
risk of locking out the expected `cargo` versions)
2025-02-26 06:22:47 -06:00
A. Taha Baki
8b46ba8b6b
Feature+: Bracoxide Zero Padding for Numeric Ranges (#15125)
adds feature spécified in bracoxide#6

```
$ echo {01..10} 
01 02 03 04 05 06 07 08 09 10
$ echo {1..010} 
001 002 003 004 005 006 007 008 009 010
```

I'm going to update the examples, but I'm currently on mobile. Will land
in a couple of days.
2025-02-19 07:35:10 -06:00
Darren Schroeder
f8ac9db15b
update to the latest reedline (#15139)
# Description

This PR updates nushell to the latest reedline commit
[4ca1ed9](4ca1ed960f)

# 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.
-->
2025-02-19 07:34:13 -06:00
dependabot[bot]
e74ce72f09
build(deps): bump data-encoding from 2.7.0 to 2.8.0 (#15101)
Bumps [data-encoding](https://github.com/ia0/data-encoding) from 2.7.0
to 2.8.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="284f84626a"><code>284f846</code></a>
Release 2.8.0 (<a
href="https://redirect.github.com/ia0/data-encoding/issues/134">#134</a>)</li>
<li><a
href="b6f9f3b9d6"><code>b6f9f3b</code></a>
Remove MSRV for unpublished crates (<a
href="https://redirect.github.com/ia0/data-encoding/issues/133">#133</a>)</li>
<li><a
href="c060e6873c"><code>c060e68</code></a>
Delete outdated cargo cache to force save (<a
href="https://redirect.github.com/ia0/data-encoding/issues/132">#132</a>)</li>
<li><a
href="d62d722222"><code>d62d722</code></a>
Remove top-level Makefile (<a
href="https://redirect.github.com/ia0/data-encoding/issues/131">#131</a>)</li>
<li><a
href="5e86676a34"><code>5e86676</code></a>
Improve CI workflow (<a
href="https://redirect.github.com/ia0/data-encoding/issues/130">#130</a>)</li>
<li><a
href="8a9537cf64"><code>8a9537c</code></a>
Improve fuzzing (<a
href="https://redirect.github.com/ia0/data-encoding/issues/129">#129</a>)</li>
<li><a
href="27a68f43cd"><code>27a68f4</code></a>
Add missing safety documentation and assertions for testing and fuzzing
(<a
href="https://redirect.github.com/ia0/data-encoding/issues/128">#128</a>)</li>
<li><a
href="06b0d89b11"><code>06b0d89</code></a>
Add BASE32_NOPAD_NOCASE and BASE32_NOPAD_VISUAL (<a
href="https://redirect.github.com/ia0/data-encoding/issues/127">#127</a>)</li>
<li>See full diff in <a
href="https://github.com/ia0/data-encoding/compare/v2.7.0...v2.8.0">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.7.0&new-version=2.8.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>
2025-02-12 12:45:27 +08:00
Piepmatz
0430167f1c
Use proc-macro-error2 instead of proc-macro-error (#15093)
<!--
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 the usage of `proc-macro-error` with
`proc-macro-error2`. At the time of writing `nu-derive-value` this
wasn't an option, at least it wasn't clear that it is the direction to
go. This shouldn't change any of the usage of `nu-derive-value` in any
way but removes one security warning.

`proc-macro-error` depends on `syn 1`, that's why I initially had the
default features for `proc-macro-error` disabled. `proc-macro-error2`
uses `syn 2` as mostly everything. So we can use that.

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

Same interface, no 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
> ```
-->

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

The tests for `nu-derive-value` do not test spans, so maybe something
changed now but probably not.

# 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.
-->

We still have `quickcheck` which depends on `syn 1` but it seems we need
that for `nu-cmd-lang`. Would be great if, in the future, we can get rid
of `syn 1` as that should improve build times a bit.
2025-02-11 15:13:34 -05:00
Stefan Holderbach
a58d9b0b3a
Refactor/fix tests affecting the whole command set (#15073)
# Description
Pre-cratification of `nu-command` we added tests that covered the whole
command set to ensure consistent documentation style choices and that
the search terms which are added are not uselessly redundant. These
tests are now moved into the suite of the main binary to truly cover all
commands.

- **Move parser quickcheck "fuzz" to `nu-cmd-lang`**
- **Factor out creation of full engine state for tests**
- **Move all-command tests to main context creation**
- **Fix all descriptions**
- **Fix search term duplicate**

# User-Facing Changes
As a result I had to fix a few command argument descriptions. (Doesn't
mean I fully stand behind this choice, but) positionals
(rest/required/optional) and top level descriptions should start with a
capital letter and end with a period. This is not enforced for flags.

# Tests + Formatting
Furthermore I moved our poor-peoples-fuzzer that runs in CI with
`quicktest` over the parser to `nu-cmd-lang` reducing its command set to
just the keywords (similar to
https://github.com/nushell/nushell/pull/15036). Thus this should also
run slightly faster (maybe a slight parallel build cost due to earlier
dependency on quicktest)
2025-02-11 11:36:36 +01:00
Stefan Holderbach
2a3d5a9d42
Bump bytesize to fix into filesize (#15088)
# Description
Closes https://github.com/nushell/nushell/issues/14866

Incorporates https://github.com/bytesize-rs/bytesize/pull/59 with
bytesize version 1.3.1

# User-Facing Changes
Now rejected strings
```
"1.3 1.3 kB" | into filesize
"1 420 kB" | into filesize
```
# Tests + Formatting
Added test with invalid input that was silently ignored before
2025-02-11 11:33:48 +01:00
Stefan Holderbach
a5d7d6dd46
Bump yanked dependencies (#15090)
Seen in the `cargo install --locked` step of the stdlib ci
- `scc`
- `sdd` [according to changelog potential use after
free](https://github.com/wvwwvwwv/scalable-delayed-dealloc/blob/main/CHANGELOG.md)

Should only be part of the `dev-dependencies` due to `serial_test`
2025-02-11 11:33:29 +01:00
dependabot[bot]
30ed63667b
build(deps): bump bytes from 1.9.0 to 1.10.0 (#15010) 2025-02-06 11:00:19 +00:00
Wind
a56906ca6d
update miette to 7.5 (#15014) 2025-02-06 11:59:19 +01:00
Yash Thakur
803a348f41
Bump to 0.102.1 dev version (#15012) 2025-02-05 00:19:48 -05:00
Yash Thakur
1aa2ed1947
Bump version to 0.102.0 (#14998) 2025-02-04 10:49:35 -05:00
Wind
30b3c42b37
update sysinfo to 0.33.1 (#14982)
Noticed by #14951 , there are some breaking changes in sysinfo 0.33. So
I create a pr manually to update it
2025-02-03 06:33:23 -06:00
Bruce Weirdan
4424481487
Supply metadata.content_type for to html output (#14990)
# Description

Adds pipeline metadata to the `to html` command output (hardcoded to
`text/html; charset=utf-8`)

# User-Facing Changes

Pipeline metadata is now included with the `to html` command output.
2025-02-03 06:32:57 -06:00
zc he
c58b432c21
fix: security_audit, bump openssl from 0.10.68 to 0.10.70 (#14991)
# Description

should fix the workflow
2025-02-03 06:27:33 -06:00
Darren Schroeder
34c09d8b35
manually revert from serde_yml to serde_yaml (#14987)
# Description

This reverts back to serde_yaml from serde_yml.
Closes https://github.com/nushell/nushell/issues/14934

Reopen https://github.com/nushell/nushell/pull/14630

# 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.
-->
2025-02-02 19:42:04 -06:00
zc he
4540f3829e
Bump lsp-textdocument from 0.4.0 to 0.4.1 (#14974)
# Description

This upstream upgrade fixes a crashing bug.

# User-Facing Changes
# Tests + Formatting
# After Submitting
2025-01-31 06:35:11 -06:00
dependabot[bot]
03bb144150
Bump shadow-rs from 0.37.0 to 0.38.0 (#14952)
Bumps [shadow-rs](https://github.com/baoyachi/shadow-rs) from 0.37.0 to
0.38.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.38.0</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: ignore false-positive clippy lint trigger by <a
href="https://github.com/mchodzikiewicz"><code>@​mchodzikiewicz</code></a>
in <a
href="https://redirect.github.com/baoyachi/shadow-rs/pull/196">baoyachi/shadow-rs#196</a></li>
<li>Rename const define by <a
href="https://github.com/baoyachi"><code>@​baoyachi</code></a> in <a
href="https://redirect.github.com/baoyachi/shadow-rs/pull/198">baoyachi/shadow-rs#198</a></li>
<li>Update git2 to v0.20 by <a
href="https://github.com/jewlexx"><code>@​jewlexx</code></a> in <a
href="https://redirect.github.com/baoyachi/shadow-rs/pull/200">baoyachi/shadow-rs#200</a></li>
<li>Unit test ci by <a
href="https://github.com/baoyachi"><code>@​baoyachi</code></a> in <a
href="https://redirect.github.com/baoyachi/shadow-rs/pull/202">baoyachi/shadow-rs#202</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/baoyachi/shadow-rs/compare/v0.37.0...v0.38.0">https://github.com/baoyachi/shadow-rs/compare/v0.37.0...v0.38.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e33e8c9b72"><code>e33e8c9</code></a>
Update Cargo.toml</li>
<li><a
href="3fec2d8656"><code>3fec2d8</code></a>
Merge pull request <a
href="https://redirect.github.com/baoyachi/shadow-rs/issues/202">#202</a>
from baoyachi/unit_test_ci</li>
<li><a
href="236f3f772a"><code>236f3f7</code></a>
fix ci</li>
<li><a
href="538f9e9b7d"><code>538f9e9</code></a>
fix ci</li>
<li><a
href="e0ae6e3f86"><code>e0ae6e3</code></a>
Merge pull request <a
href="https://redirect.github.com/baoyachi/shadow-rs/issues/200">#200</a>
from winpax/patch-1</li>
<li><a
href="0c6a61c32d"><code>0c6a61c</code></a>
Update git2 to v0.20</li>
<li><a
href="15e2a231ad"><code>15e2a23</code></a>
Merge pull request <a
href="https://redirect.github.com/baoyachi/shadow-rs/issues/198">#198</a>
from baoyachi/feature/use_define</li>
<li><a
href="311a081432"><code>311a081</code></a>
Rename const define</li>
<li><a
href="d8d857c8a9"><code>d8d857c</code></a>
Merge pull request <a
href="https://redirect.github.com/baoyachi/shadow-rs/issues/196">#196</a>
from mchodzikiewicz/fix/nightly-clippy-lint</li>
<li><a
href="fe40af0ab6"><code>fe40af0</code></a>
fix: ignore false-positive clippy lint trigger</li>
<li>See full diff in <a
href="https://github.com/baoyachi/shadow-rs/compare/v0.37.0...v0.38.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=shadow-rs&package-manager=cargo&previous-version=0.37.0&new-version=0.38.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>
2025-01-29 08:56:27 +08:00
dependabot[bot]
5fa79e6e5f
Bump brotli from 6.0.0 to 7.0.0 (#14949)
Bumps [brotli](https://github.com/dropbox/rust-brotli) from 6.0.0 to
7.0.0.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/dropbox/rust-brotli/commits">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=brotli&package-manager=cargo&previous-version=6.0.0&new-version=7.0.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>
2025-01-29 08:30:01 +08:00
Jack Wright
c0b4d19761
Polars upgrade to 0.46 (#14933)
Upgraded to Polars 0.46
2025-01-27 13:01:39 -06:00
Ian Manske
7ea4895513
Use ref-cast crate to remove some unsafe (#14897)
# Description

In a few places, `nu-path` uses `unsafe` to do reference casts. This PR
adds the [`ref-cast`](https://crates.io/crates/ref-cast) crate to do
reference casts in a "safe" manner.
2025-01-26 12:43:45 -08:00
Darren Schroeder
cdbb3ee7b9
add version check command (#14880)
# Description

This PR supersedes https://github.com/nushell/nushell/pull/14813 by
making it a built-in command instead of checking for the latest version
at some interval when nushell starts.

This is what it looks like.

![image](https://github.com/user-attachments/assets/35629425-b332-4078-aea5-4931cfb0471f)

This example shows the output when the running version was
0.101.1-nightly.10

![image](https://github.com/user-attachments/assets/71216635-fb75-4251-a443-bf0d0b9a1c07)


Description from old PR.
One key functionality that I thought was interesting with this and that
I worked with @hustcer on was to try and make sure it works with
nightlies. So, it should tell you when there's a new nightly version
that is available to download. This way, you can know about it without
checking.

What's key from a nightly perspective is (1) the tags are now semver
compliant and (2) hustcer now updates the Cargo.toml package.version
version number prior to compilation so you can know you're running a
nightly version, and this PR uses that information to know whether to
check the nightly repo or the nushell repo for updates.

This uses the
[update-informer](https://docs.rs/update-informer/latest/update_informer/)
crate. NOTE that this _informs_ you of updates but does not
automatically update. I kind of see this as the first step to eventually
having an auto updater.

There was caching of the version in the old PR since it ran on every
nushell startup. Since this PR makes it a command and therefore always
runs on-demand, I've removed the caching so that it always checks when
you run 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.
-->
2025-01-23 15:23:17 +01:00
Ian Manske
93e121782c
Improve and fix filesize formatting/display (#14397)
# Description

This PR cleans up the code surrounding formatting and displaying file
sizes.
- The `byte_unit` crate we use for file size units displays kilobytes as
`KB`, which is not the SI or ISO/IEC standard. Rather it should be `kB`,
so this fixes #8872. On some systems, `KB` actually means `KiB`, so this
avoids any potential confusion.
- The `byte_unit` crate, when displaying file sizes, casts integers to
floats which will lose precision for large file sizes. This PR adds a
custom `Display` implementation for `Filesize` that can give an exact
string representation of a `Filesize` for metric/SI units.
- This PR also removes the dependency on the `byte_unit` crate which
brought in several other dependencies.

Additionally, this PR makes some changes to the config for filesize
formatting (`$env.config.filesize`).
- The previous filesize config had the `metric` and `format` options. If
a metric (SI) unit was set in `format`, but `metric` was set to false,
then the `metric` option would take precedence and convert `format` to
the corresponding binary unit (or vice versa). E.g., `{ format: kB,
metric: false }` => `KiB`. Instead, this PR adds the `unit` option to
replace the `format` and `metric` options. `unit` can be set to a fixed
file size unit like `kB` or `KiB`, or it can be set to one of the
special options: `binary` or `metric`. These options tells nushell to
format file sizes using an appropriately scaled metric or binary unit
(examples below).
  ```nushell
  # precision = null

  # unit = kB
  1kB  # 1 kB
  1KiB # 1.024 kB
  
  # unit = KiB
  1kB  # 0.9765625 KiB
  1KiB # 1 KiB
  
  # unit = metric
  1000B     # 1 kB
  1024B     # 1.024 kB
  10_000MB  # 10 GB
  10_240MiB # 10.73741824 GB

  # unit = binary
  1000B     # 1000 B
  1024B     # 1 KiB
  10_000MB  # 9.313225746154785 GiB
  10_240MiB # 10 GiB
  ```
- In addition, this PR also adds the `precision` option to the filesize
config. It determines how many digits to show after the decimal point.
If set to null, then everything after the decimal point is shown.
- The default filesize config is `{ unit: metric, precision: 1 }`.

# User-Facing Changes

- Commands that use the config to format file sizes will follow the
changes described above (e.g., `table`, `into string`, `to text`, etc.).
- The file size unit/format passed to `format filesize` is now case
sensitive. An error with the valid units is shown if the case does not
match.
- `$env.config.filesize.format` and `$env.config.filesize.metric` are
deprecated and replaced by `$env.config.filesize.unit`.
- A new `$env.config.filesize.precision` option was added.

# Tests + Formatting

Mostly updated test expected outputs.

# After Submitting

This PR does not change the way NUON serializes file sizes, because that
would require changing the nu parser to be able to losslessly decode the
new, exact string representation introduced in this PR.

Similarly, this PR also does not change the file size parsing in any
way. Although the file size units provided to `format filesize` or the
filesize config are now case-sensitive, the same is not yet true for
file size literals in nushell code.
2025-01-22 22:24:51 -08:00
dependabot[bot]
28ca0e7116
Bump similar from 2.6.0 to 2.7.0 (#14888)
Bumps [similar](https://github.com/mitsuhiko/similar) from 2.6.0 to
2.7.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mitsuhiko/similar/blob/main/CHANGELOG.md">similar's
changelog</a>.</em></p>
<blockquote>
<h2>2.7.0</h2>
<ul>
<li>Add optional support for <code>web-time</code> to support web WASM
targets. <a
href="https://redirect.github.com/mitsuhiko/similar/issues/73">#73</a></li>
<li>Crate will no longer panic wheh deadlines are used in WASM. At worst
deadlines are silently ignored.  To enforce deadlines enable the
<code>wasm32_web_time</code> feature. <a
href="https://redirect.github.com/mitsuhiko/similar/issues/74">#74</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="28c146b628"><code>28c146b</code></a>
2.7.0</li>
<li><a
href="3ec4464a26"><code>3ec4464</code></a>
Added another changelog entry</li>
<li><a
href="5077768172"><code>5077768</code></a>
Add wasm tests (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/74">#74</a>)</li>
<li><a
href="2b2881a375"><code>2b2881a</code></a>
Added web-time changelog entry</li>
<li><a
href="177ce9e700"><code>177ce9e</code></a>
Add wasm32_web_time feature (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/73">#73</a>)</li>
<li><a
href="717757e156"><code>717757e</code></a>
Another clippy fix</li>
<li><a
href="157f01564d"><code>157f015</code></a>
Make clippy happier (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/72">#72</a>)</li>
<li>See full diff in <a
href="https://github.com/mitsuhiko/similar/compare/2.6.0...2.7.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=similar&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>
2025-01-22 20:36:24 +08:00
zc he
84c720daf5
fix(lsp): renaming of flag variables (#14890)
<!--
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 fixes a bug: renaming on a flag variable removes the leading
`--` in the signature.

<img width="257" alt="image"
src="https://github.com/user-attachments/assets/767c62de-f3a0-4a07-9786-61b21e8cfcb6"
/>

Gets the following before this PR:

```nushell
export def foooo [
  p: int
] {
  $p
}
```

# 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.
-->
2025-01-22 06:25:30 -06:00
Solomon
500cd35ad2
update uutils crates to 0.0.29 (#14867)
Closes #13082, closes #13508
2025-01-19 16:46:48 -05:00
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).
2025-01-17 06:24:00 -06:00
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.
-->
2025-01-15 16:29:34 -06:00
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
2025-01-16 06:10:28 +08:00
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="5f3296df77"><code>5f3296d</code></a>
chore: prepare Tokio v1.43.0 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7079">#7079</a>)</li>
<li><a
href="cc974a646b"><code>cc974a6</code></a>
chore: prepare tokio-macros v2.5.0 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7078">#7078</a>)</li>
<li><a
href="15495fd883"><code>15495fd</code></a>
metrics: improve flexibility of H2Histogram Configuration (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6963">#6963</a>)</li>
<li><a
href="ad4183412a"><code>ad41834</code></a>
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><a
href="bd3e857737"><code>bd3e857</code></a>
runtime: move <code>is_join_waker_set</code> assertion in
<code>unset_waker</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7072">#7072</a>)</li>
<li><a
href="15f73666f1"><code>15f7366</code></a>
runtime: fix <code>LocalRuntime</code> doc links (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7074">#7074</a>)</li>
<li><a
href="fd2048dad1"><code>fd2048d</code></a>
ci: split miri jobs into unit and integration tests (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7071">#7071</a>)</li>
<li><a
href="e8f39157b6"><code>e8f3915</code></a>
chore: use unsync loads for <code>unsync_load</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7073">#7073</a>)</li>
<li><a
href="67f127769b"><code>67f1277</code></a>
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><a
href="463502cbaf"><code>463502c</code></a>
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>Additional commits viewable in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-1.42.0...tokio-1.43.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.42.0&new-version=1.43.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>
2025-01-15 09:30:09 +08:00
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>
2025-01-15 09:29:52 +08:00
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&lt;Uuid&gt;</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="c5f1d020f6"><code>c5f1d02</code></a>
Merge pull request <a
href="https://redirect.github.com/uuid-rs/uuid/issues/784">#784</a> from
uuid-rs/cargo/1.12.0</li>
<li><a
href="4cfbd83dee"><code>4cfbd83</code></a>
fix deprecation versions</li>
<li><a
href="8f761754c0"><code>8f76175</code></a>
prepare for 1.12.0 release</li>
<li><a
href="358eb34384"><code>358eb34</code></a>
Merge pull request <a
href="https://redirect.github.com/uuid-rs/uuid/issues/783">#783</a> from
uuid-rs/feat/non-nil</li>
<li><a
href="6c5099e7a5"><code>6c5099e</code></a>
also remove borsh from NonNilUuid for now</li>
<li><a
href="b12c6909d0"><code>b12c690</code></a>
fix up non nil docs</li>
<li><a
href="38df005749"><code>38df005</code></a>
remove zerocopy from NonNilUuid for now</li>
<li><a
href="4021daa72f"><code>4021daa</code></a>
fix up zerocopy derives</li>
<li><a
href="f570b5714c"><code>f570b57</code></a>
support equality between NonNilUuid and Uuid</li>
<li><a
href="4ffd872792"><code>4ffd872</code></a>
add a few missing derives</li>
<li>Additional commits viewable in <a
href="https://github.com/uuid-rs/uuid/compare/1.11.0...1.12.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=uuid&package-manager=cargo&previous-version=1.11.0&new-version=1.12.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>
2025-01-15 09:29:37 +08:00
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.
-->
2025-01-14 16:51:30 -06:00
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.
-->
2025-01-13 07:00:21 -06:00
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.
-->
2025-01-09 07:19:32 -06:00
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="e7a40e3731"><code>e7a40e3</code></a>
Release v3.15.0</li>
<li><a
href="ea45f476d7"><code>ea45f47</code></a>
feat: re-seed from system randomness on collision (<a
href="https://redirect.github.com/Stebalien/tempfile/issues/314">#314</a>)</li>
<li><a
href="16209da6e6"><code>16209da</code></a>
Fix link to ticket in changelog (<a
href="https://redirect.github.com/Stebalien/tempfile/issues/310">#310</a>)</li>
<li><a
href="ae22b273a1"><code>ae22b27</code></a>
docs: add owasp link on insecure temporary files (<a
href="https://redirect.github.com/Stebalien/tempfile/issues/309">#309</a>)</li>
<li>See full diff in <a
href="https://github.com/Stebalien/tempfile/compare/v3.14.0...v3.15.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tempfile&package-manager=cargo&previous-version=3.14.0&new-version=3.15.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>
2025-01-09 13:51:08 +01:00
dependabot[bot]
cc4d4acc6b
Bump git2 from 0.19.0 to 0.20.0 (#14776) 2025-01-08 13:53:02 +00:00
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.
-->
2025-01-05 07:11:17 -06:00
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.
2025-01-01 19:04:17 -05:00
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.
-->
2025-01-01 17:37:50 -06:00
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>
2024-12-28 08:19:48 -06:00
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.
2024-12-25 21:35:49 +08:00
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.
2024-12-25 07:04:43 -06:00