diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 783ae18868..493719efc7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -98,9 +98,10 @@ jobs: TARGET: ${{ matrix.target }} _EXTRA_: ${{ matrix.extra }} - # REF: https://github.com/marketplace/actions/gh-release + # WARN: Don't upgrade this action due to the release per asset issue. + # See: https://github.com/softprops/action-gh-release/issues/445 - name: Publish Archive - uses: softprops/action-gh-release@v2.0.9 + uses: softprops/action-gh-release@v2.0.5 if: ${{ startsWith(github.ref, 'refs/tags/') }} with: draft: true @@ -124,7 +125,7 @@ jobs: - name: Create Checksums run: cd release && shasum -a 256 * > ../SHA256SUMS - name: Publish Checksums - uses: softprops/action-gh-release@v2.0.9 + uses: softprops/action-gh-release@v2.0.5 with: draft: true files: SHA256SUMS diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml index be6da05e82..2c0fcbd771 100644 --- a/.github/workflows/typos.yml +++ b/.github/workflows/typos.yml @@ -10,4 +10,4 @@ jobs: uses: actions/checkout@v4.1.7 - name: Check spelling - uses: crate-ci/typos@v1.27.0 + uses: crate-ci/typos@v1.27.3 diff --git a/Cargo.lock b/Cargo.lock index e946a058e2..7343d3c043 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2401,9 +2401,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.158" +version = "0.2.162" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" [[package]] name = "libflate" @@ -2805,9 +2805,9 @@ dependencies = [ [[package]] name = "mockito" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b34bd91b9e5c5b06338d392463e1318d683cf82ec3d3af4014609be6e2108d" +checksum = "652cd6d169a36eaf9d1e6bce1a221130439a966d7f27858af66a33a66e9c4ee2" dependencies = [ "assert-json-diff", "bytes", @@ -2971,7 +2971,7 @@ dependencies = [ [[package]] name = "nu" -version = "0.99.2" +version = "0.100.1" dependencies = [ "assert_cmd", "crossterm 0.28.1", @@ -3026,7 +3026,7 @@ dependencies = [ [[package]] name = "nu-cli" -version = "0.99.2" +version = "0.100.1" dependencies = [ "chrono", "crossterm 0.28.1", @@ -3060,7 +3060,7 @@ dependencies = [ [[package]] name = "nu-cmd-base" -version = "0.99.2" +version = "0.100.1" dependencies = [ "indexmap", "miette", @@ -3072,7 +3072,7 @@ dependencies = [ [[package]] name = "nu-cmd-extra" -version = "0.99.2" +version = "0.100.1" dependencies = [ "fancy-regex", "heck", @@ -3097,7 +3097,7 @@ dependencies = [ [[package]] name = "nu-cmd-lang" -version = "0.99.2" +version = "0.100.1" dependencies = [ "itertools 0.13.0", "nu-engine", @@ -3109,7 +3109,7 @@ dependencies = [ [[package]] name = "nu-cmd-plugin" -version = "0.99.2" +version = "0.100.1" dependencies = [ "itertools 0.13.0", "nu-engine", @@ -3120,7 +3120,7 @@ dependencies = [ [[package]] name = "nu-color-config" -version = "0.99.2" +version = "0.100.1" dependencies = [ "nu-ansi-term", "nu-engine", @@ -3132,7 +3132,7 @@ dependencies = [ [[package]] name = "nu-command" -version = "0.99.2" +version = "0.100.1" dependencies = [ "alphanumeric-sort", "base64 0.22.1", @@ -3242,7 +3242,7 @@ dependencies = [ [[package]] name = "nu-derive-value" -version = "0.99.2" +version = "0.100.1" dependencies = [ "heck", "proc-macro-error", @@ -3253,7 +3253,7 @@ dependencies = [ [[package]] name = "nu-engine" -version = "0.99.2" +version = "0.100.1" dependencies = [ "log", "nu-glob", @@ -3265,7 +3265,7 @@ dependencies = [ [[package]] name = "nu-explore" -version = "0.99.2" +version = "0.100.1" dependencies = [ "ansi-str", "anyhow", @@ -3290,14 +3290,14 @@ dependencies = [ [[package]] name = "nu-glob" -version = "0.99.2" +version = "0.100.1" dependencies = [ "doc-comment", ] [[package]] name = "nu-json" -version = "0.99.2" +version = "0.100.1" dependencies = [ "fancy-regex", "linked-hash-map", @@ -3310,7 +3310,7 @@ dependencies = [ [[package]] name = "nu-lsp" -version = "0.99.2" +version = "0.100.1" dependencies = [ "assert-json-diff", "crossbeam-channel", @@ -3331,7 +3331,7 @@ dependencies = [ [[package]] name = "nu-parser" -version = "0.99.2" +version = "0.100.1" dependencies = [ "bytesize", "chrono", @@ -3348,7 +3348,7 @@ dependencies = [ [[package]] name = "nu-path" -version = "0.99.2" +version = "0.100.1" dependencies = [ "dirs", "omnipath", @@ -3357,7 +3357,7 @@ dependencies = [ [[package]] name = "nu-plugin" -version = "0.99.2" +version = "0.100.1" dependencies = [ "log", "nix 0.29.0", @@ -3373,7 +3373,7 @@ dependencies = [ [[package]] name = "nu-plugin-core" -version = "0.99.2" +version = "0.100.1" dependencies = [ "interprocess", "log", @@ -3387,7 +3387,7 @@ dependencies = [ [[package]] name = "nu-plugin-engine" -version = "0.99.2" +version = "0.100.1" dependencies = [ "log", "nu-engine", @@ -3403,7 +3403,7 @@ dependencies = [ [[package]] name = "nu-plugin-protocol" -version = "0.99.2" +version = "0.100.1" dependencies = [ "nu-protocol", "nu-utils", @@ -3415,7 +3415,7 @@ dependencies = [ [[package]] name = "nu-plugin-test-support" -version = "0.99.2" +version = "0.100.1" dependencies = [ "nu-ansi-term", "nu-cmd-lang", @@ -3433,7 +3433,7 @@ dependencies = [ [[package]] name = "nu-pretty-hex" -version = "0.99.2" +version = "0.100.1" dependencies = [ "heapless", "nu-ansi-term", @@ -3442,7 +3442,7 @@ dependencies = [ [[package]] name = "nu-protocol" -version = "0.99.2" +version = "0.100.1" dependencies = [ "brotli", "byte-unit", @@ -3480,7 +3480,7 @@ dependencies = [ [[package]] name = "nu-std" -version = "0.99.2" +version = "0.100.1" dependencies = [ "log", "miette", @@ -3491,7 +3491,7 @@ dependencies = [ [[package]] name = "nu-system" -version = "0.99.2" +version = "0.100.1" dependencies = [ "chrono", "itertools 0.13.0", @@ -3508,7 +3508,7 @@ dependencies = [ [[package]] name = "nu-table" -version = "0.99.2" +version = "0.100.1" dependencies = [ "fancy-regex", "nu-ansi-term", @@ -3522,7 +3522,7 @@ dependencies = [ [[package]] name = "nu-term-grid" -version = "0.99.2" +version = "0.100.1" dependencies = [ "nu-utils", "unicode-width", @@ -3530,7 +3530,7 @@ dependencies = [ [[package]] name = "nu-test-support" -version = "0.99.2" +version = "0.100.1" dependencies = [ "nu-glob", "nu-path", @@ -3542,7 +3542,7 @@ dependencies = [ [[package]] name = "nu-utils" -version = "0.99.2" +version = "0.100.1" dependencies = [ "crossterm_winapi", "fancy-regex", @@ -3569,7 +3569,7 @@ dependencies = [ [[package]] name = "nu_plugin_example" -version = "0.99.2" +version = "0.100.1" dependencies = [ "nu-cmd-lang", "nu-plugin", @@ -3579,7 +3579,7 @@ dependencies = [ [[package]] name = "nu_plugin_formats" -version = "0.99.2" +version = "0.100.1" dependencies = [ "chrono", "eml-parser", @@ -3594,7 +3594,7 @@ dependencies = [ [[package]] name = "nu_plugin_gstat" -version = "0.99.2" +version = "0.100.1" dependencies = [ "git2", "nu-plugin", @@ -3603,7 +3603,7 @@ dependencies = [ [[package]] name = "nu_plugin_inc" -version = "0.99.2" +version = "0.100.1" dependencies = [ "nu-plugin", "nu-protocol", @@ -3612,7 +3612,7 @@ dependencies = [ [[package]] name = "nu_plugin_polars" -version = "0.99.2" +version = "0.100.1" dependencies = [ "chrono", "chrono-tz 0.10.0", @@ -3647,7 +3647,7 @@ dependencies = [ [[package]] name = "nu_plugin_query" -version = "0.99.2" +version = "0.100.1" dependencies = [ "gjson", "nu-plugin", @@ -3662,7 +3662,7 @@ dependencies = [ [[package]] name = "nu_plugin_stress_internals" -version = "0.99.2" +version = "0.100.1" dependencies = [ "interprocess", "serde", @@ -3776,7 +3776,7 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "nuon" -version = "0.99.2" +version = "0.100.1" dependencies = [ "chrono", "nu-engine", @@ -5178,8 +5178,9 @@ dependencies = [ [[package]] name = "reedline" -version = "0.36.0" -source = "git+https://github.com/nushell/reedline?branch=main#7a1b344a9f6314bc801bf82f42bf739a11a78fe3" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9834765acaa2deedf29197f2da3d309801683beb20e25775bc0249f97a7b9a74" dependencies = [ "arboard", "chrono", @@ -5475,9 +5476,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" dependencies = [ "bitflags 2.6.0", "errno", @@ -5712,9 +5713,9 @@ dependencies = [ [[package]] name = "serial_test" -version = "3.1.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b4b487fe2acf240a021cf57c6b2b4903b1e78ca0ecd862a71b71d2a51fed77d" +checksum = "1b258109f244e1d6891bf1053a55d63a5cd4f8f4c30cf9a1280989f80e7a1fa9" dependencies = [ "futures", "log", @@ -5726,9 +5727,9 @@ dependencies = [ [[package]] name = "serial_test_derive" -version = "3.1.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" +checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" dependencies = [ "proc-macro2", "quote", @@ -6195,9 +6196,9 @@ checksum = "c1bbb9f3c5c463a01705937a24fdabc5047929ac764b2d5b9cf681c1f5041ed5" [[package]] name = "tempfile" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", diff --git a/Cargo.toml b/Cargo.toml index 1be660ccea..e7318fa006 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" name = "nu" repository = "https://github.com/nushell/nushell" rust-version = "1.80.1" -version = "0.99.2" +version = "0.100.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -109,7 +109,7 @@ md5 = { version = "0.10", package = "md-5" } miette = "7.2" mime = "0.3.17" mime_guess = "2.0" -mockito = { version = "1.5", default-features = false } +mockito = { version = "1.6", default-features = false } multipart-rs = "0.1.11" native-tls = "0.2" nix = { version = "0.29", default-features = false } @@ -137,7 +137,7 @@ rand = "0.8" rand_chacha = "0.3.1" ratatui = "0.26" rayon = "1.10" -reedline = "0.36.0" +reedline = "0.37.0" regex = "1.9.5" rmp = "0.8" rmp-serde = "1.3" @@ -155,7 +155,7 @@ strip-ansi-escapes = "0.2.0" syn = "2.0" sysinfo = "0.32" tabled = { version = "0.16.0", default-features = false } -tempfile = "3.13" +tempfile = "3.14" terminal_size = "0.3" titlecase = "2.0" toml = "0.8" @@ -189,22 +189,22 @@ unchecked_duration_subtraction = "warn" workspace = true [dependencies] -nu-cli = { path = "./crates/nu-cli", version = "0.99.2" } -nu-cmd-base = { path = "./crates/nu-cmd-base", version = "0.99.2" } -nu-cmd-lang = { path = "./crates/nu-cmd-lang", version = "0.99.2" } -nu-cmd-plugin = { path = "./crates/nu-cmd-plugin", version = "0.99.2", optional = true } -nu-cmd-extra = { path = "./crates/nu-cmd-extra", version = "0.99.2" } -nu-command = { path = "./crates/nu-command", version = "0.99.2" } -nu-engine = { path = "./crates/nu-engine", version = "0.99.2" } -nu-explore = { path = "./crates/nu-explore", version = "0.99.2" } -nu-lsp = { path = "./crates/nu-lsp/", version = "0.99.2" } -nu-parser = { path = "./crates/nu-parser", version = "0.99.2" } -nu-path = { path = "./crates/nu-path", version = "0.99.2" } -nu-plugin-engine = { path = "./crates/nu-plugin-engine", optional = true, version = "0.99.2" } -nu-protocol = { path = "./crates/nu-protocol", version = "0.99.2" } -nu-std = { path = "./crates/nu-std", version = "0.99.2" } -nu-system = { path = "./crates/nu-system", version = "0.99.2" } -nu-utils = { path = "./crates/nu-utils", version = "0.99.2" } +nu-cli = { path = "./crates/nu-cli", version = "0.100.1" } +nu-cmd-base = { path = "./crates/nu-cmd-base", version = "0.100.1" } +nu-cmd-lang = { path = "./crates/nu-cmd-lang", version = "0.100.1" } +nu-cmd-plugin = { path = "./crates/nu-cmd-plugin", version = "0.100.1", optional = true } +nu-cmd-extra = { path = "./crates/nu-cmd-extra", version = "0.100.1" } +nu-command = { path = "./crates/nu-command", version = "0.100.1" } +nu-engine = { path = "./crates/nu-engine", version = "0.100.1" } +nu-explore = { path = "./crates/nu-explore", version = "0.100.1" } +nu-lsp = { path = "./crates/nu-lsp/", version = "0.100.1" } +nu-parser = { path = "./crates/nu-parser", version = "0.100.1" } +nu-path = { path = "./crates/nu-path", version = "0.100.1" } +nu-plugin-engine = { path = "./crates/nu-plugin-engine", optional = true, version = "0.100.1" } +nu-protocol = { path = "./crates/nu-protocol", version = "0.100.1" } +nu-std = { path = "./crates/nu-std", version = "0.100.1" } +nu-system = { path = "./crates/nu-system", version = "0.100.1" } +nu-utils = { path = "./crates/nu-utils", version = "0.100.1" } reedline = { workspace = true, features = ["bashisms", "sqlite"] } crossterm = { workspace = true } @@ -234,16 +234,16 @@ nix = { workspace = true, default-features = false, features = [ ] } [dev-dependencies] -nu-test-support = { path = "./crates/nu-test-support", version = "0.99.2" } -nu-plugin-protocol = { path = "./crates/nu-plugin-protocol", version = "0.99.2" } -nu-plugin-core = { path = "./crates/nu-plugin-core", version = "0.99.2" } +nu-test-support = { path = "./crates/nu-test-support", version = "0.100.1" } +nu-plugin-protocol = { path = "./crates/nu-plugin-protocol", version = "0.100.1" } +nu-plugin-core = { path = "./crates/nu-plugin-core", version = "0.100.1" } assert_cmd = "2.0" dirs = { workspace = true } tango-bench = "0.6" pretty_assertions = { workspace = true } regex = { workspace = true } rstest = { workspace = true, default-features = false } -serial_test = "3.1" +serial_test = "3.2" tempfile = { workspace = true } [features] @@ -313,7 +313,7 @@ bench = false # To use a development version of a dependency please use a global override here # changing versions in each sub-crate of the workspace is tedious [patch.crates-io] -reedline = { git = "https://github.com/nushell/reedline", branch = "main" } +# reedline = { git = "https://github.com/nushell/reedline", branch = "main" } # nu-ansi-term = {git = "https://github.com/nushell/nu-ansi-term.git", branch = "main"} # Run all benchmarks with `cargo bench` diff --git a/crates/nu-cli/Cargo.toml b/crates/nu-cli/Cargo.toml index 944a485d5e..b91314ddcf 100644 --- a/crates/nu-cli/Cargo.toml +++ b/crates/nu-cli/Cargo.toml @@ -5,27 +5,27 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cli" edition = "2021" license = "MIT" name = "nu-cli" -version = "0.99.2" +version = "0.100.1" [lib] bench = false [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.99.2" } -nu-command = { path = "../nu-command", version = "0.99.2" } -nu-test-support = { path = "../nu-test-support", version = "0.99.2" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.100.1" } +nu-command = { path = "../nu-command", version = "0.100.1" } +nu-test-support = { path = "../nu-test-support", version = "0.100.1" } rstest = { workspace = true, default-features = false } tempfile = { workspace = true } [dependencies] -nu-cmd-base = { path = "../nu-cmd-base", version = "0.99.2" } -nu-engine = { path = "../nu-engine", version = "0.99.2" } -nu-path = { path = "../nu-path", version = "0.99.2" } -nu-parser = { path = "../nu-parser", version = "0.99.2" } -nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.99.2", optional = true } -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } -nu-utils = { path = "../nu-utils", version = "0.99.2" } -nu-color-config = { path = "../nu-color-config", version = "0.99.2" } +nu-cmd-base = { path = "../nu-cmd-base", version = "0.100.1" } +nu-engine = { path = "../nu-engine", version = "0.100.1" } +nu-path = { path = "../nu-path", version = "0.100.1" } +nu-parser = { path = "../nu-parser", version = "0.100.1" } +nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.100.1", optional = true } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } +nu-utils = { path = "../nu-utils", version = "0.100.1" } +nu-color-config = { path = "../nu-color-config", version = "0.100.1" } nu-ansi-term = { workspace = true } reedline = { workspace = true, features = ["bashisms", "sqlite"] } diff --git a/crates/nu-cmd-base/Cargo.toml b/crates/nu-cmd-base/Cargo.toml index 558ab9d9ea..e47dc12641 100644 --- a/crates/nu-cmd-base/Cargo.toml +++ b/crates/nu-cmd-base/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu-cmd-base" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-base" -version = "0.99.2" +version = "0.100.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -13,10 +13,10 @@ version = "0.99.2" workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.99.2" } -nu-parser = { path = "../nu-parser", version = "0.99.2" } -nu-path = { path = "../nu-path", version = "0.99.2" } -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } +nu-engine = { path = "../nu-engine", version = "0.100.1" } +nu-parser = { path = "../nu-parser", version = "0.100.1" } +nu-path = { path = "../nu-path", version = "0.100.1" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } indexmap = { workspace = true } miette = { workspace = true } diff --git a/crates/nu-cmd-extra/Cargo.toml b/crates/nu-cmd-extra/Cargo.toml index 81dfc9ede2..eec817059b 100644 --- a/crates/nu-cmd-extra/Cargo.toml +++ b/crates/nu-cmd-extra/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu-cmd-extra" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-extra" -version = "0.99.2" +version = "0.100.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -16,13 +16,13 @@ bench = false workspace = true [dependencies] -nu-cmd-base = { path = "../nu-cmd-base", version = "0.99.2" } -nu-engine = { path = "../nu-engine", version = "0.99.2" } -nu-json = { version = "0.99.2", path = "../nu-json" } -nu-parser = { path = "../nu-parser", version = "0.99.2" } -nu-pretty-hex = { version = "0.99.2", path = "../nu-pretty-hex" } -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } -nu-utils = { path = "../nu-utils", version = "0.99.2" } +nu-cmd-base = { path = "../nu-cmd-base", version = "0.100.1" } +nu-engine = { path = "../nu-engine", version = "0.100.1" } +nu-json = { version = "0.100.1", path = "../nu-json" } +nu-parser = { path = "../nu-parser", version = "0.100.1" } +nu-pretty-hex = { version = "0.100.1", path = "../nu-pretty-hex" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } +nu-utils = { path = "../nu-utils", version = "0.100.1" } # Potential dependencies for extras heck = { workspace = true } @@ -36,6 +36,6 @@ v_htmlescape = { workspace = true } itertools = { workspace = true } [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.99.2" } -nu-command = { path = "../nu-command", version = "0.99.2" } -nu-test-support = { path = "../nu-test-support", version = "0.99.2" } \ No newline at end of file +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.100.1" } +nu-command = { path = "../nu-command", version = "0.100.1" } +nu-test-support = { path = "../nu-test-support", version = "0.100.1" } \ No newline at end of file diff --git a/crates/nu-cmd-lang/Cargo.toml b/crates/nu-cmd-lang/Cargo.toml index 0c5905c65e..c5609e4ff8 100644 --- a/crates/nu-cmd-lang/Cargo.toml +++ b/crates/nu-cmd-lang/Cargo.toml @@ -6,7 +6,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-lang" edition = "2021" license = "MIT" name = "nu-cmd-lang" -version = "0.99.2" +version = "0.100.1" [lib] bench = false @@ -15,10 +15,10 @@ bench = false workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.99.2" } -nu-parser = { path = "../nu-parser", version = "0.99.2" } -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } -nu-utils = { path = "../nu-utils", version = "0.99.2" } +nu-engine = { path = "../nu-engine", version = "0.100.1" } +nu-parser = { path = "../nu-parser", version = "0.100.1" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } +nu-utils = { path = "../nu-utils", version = "0.100.1" } itertools = { workspace = true } shadow-rs = { version = "0.35", default-features = false } diff --git a/crates/nu-cmd-plugin/Cargo.toml b/crates/nu-cmd-plugin/Cargo.toml index 9d1b9aede4..e5a9a61b1c 100644 --- a/crates/nu-cmd-plugin/Cargo.toml +++ b/crates/nu-cmd-plugin/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu-cmd-plugin" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-plugin" -version = "0.99.2" +version = "0.100.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -13,10 +13,10 @@ version = "0.99.2" workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.99.2" } -nu-path = { path = "../nu-path", version = "0.99.2" } -nu-protocol = { path = "../nu-protocol", version = "0.99.2", features = ["plugin"] } -nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.99.2" } +nu-engine = { path = "../nu-engine", version = "0.100.1" } +nu-path = { path = "../nu-path", version = "0.100.1" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1", features = ["plugin"] } +nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.100.1" } itertools = { workspace = true } diff --git a/crates/nu-color-config/Cargo.toml b/crates/nu-color-config/Cargo.toml index 85925f22da..abf95023cc 100644 --- a/crates/nu-color-config/Cargo.toml +++ b/crates/nu-color-config/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-color-confi edition = "2021" license = "MIT" name = "nu-color-config" -version = "0.99.2" +version = "0.100.1" [lib] bench = false @@ -14,12 +14,12 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } -nu-engine = { path = "../nu-engine", version = "0.99.2" } -nu-json = { path = "../nu-json", version = "0.99.2" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } +nu-engine = { path = "../nu-engine", version = "0.100.1" } +nu-json = { path = "../nu-json", version = "0.100.1" } nu-ansi-term = { workspace = true } serde = { workspace = true, features = ["derive"] } [dev-dependencies] -nu-test-support = { path = "../nu-test-support", version = "0.99.2" } \ No newline at end of file +nu-test-support = { path = "../nu-test-support", version = "0.100.1" } \ No newline at end of file diff --git a/crates/nu-command/Cargo.toml b/crates/nu-command/Cargo.toml index d4d31338b3..e9c3b9a784 100644 --- a/crates/nu-command/Cargo.toml +++ b/crates/nu-command/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu-command" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-command" -version = "0.99.2" +version = "0.100.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -16,21 +16,21 @@ bench = false workspace = true [dependencies] -nu-cmd-base = { path = "../nu-cmd-base", version = "0.99.2" } -nu-color-config = { path = "../nu-color-config", version = "0.99.2" } -nu-engine = { path = "../nu-engine", version = "0.99.2" } -nu-glob = { path = "../nu-glob", version = "0.99.2" } -nu-json = { path = "../nu-json", version = "0.99.2" } -nu-parser = { path = "../nu-parser", version = "0.99.2" } -nu-path = { path = "../nu-path", version = "0.99.2" } -nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.99.2" } -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } -nu-system = { path = "../nu-system", version = "0.99.2" } -nu-table = { path = "../nu-table", version = "0.99.2" } -nu-term-grid = { path = "../nu-term-grid", version = "0.99.2" } -nu-utils = { path = "../nu-utils", version = "0.99.2" } +nu-cmd-base = { path = "../nu-cmd-base", version = "0.100.1" } +nu-color-config = { path = "../nu-color-config", version = "0.100.1" } +nu-engine = { path = "../nu-engine", version = "0.100.1" } +nu-glob = { path = "../nu-glob", version = "0.100.1" } +nu-json = { path = "../nu-json", version = "0.100.1" } +nu-parser = { path = "../nu-parser", version = "0.100.1" } +nu-path = { path = "../nu-path", version = "0.100.1" } +nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.100.1" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } +nu-system = { path = "../nu-system", version = "0.100.1" } +nu-table = { path = "../nu-table", version = "0.100.1" } +nu-term-grid = { path = "../nu-term-grid", version = "0.100.1" } +nu-utils = { path = "../nu-utils", version = "0.100.1" } nu-ansi-term = { workspace = true } -nuon = { path = "../nuon", version = "0.99.2" } +nuon = { path = "../nuon", version = "0.100.1" } alphanumeric-sort = { workspace = true } base64 = { workspace = true } @@ -139,8 +139,8 @@ sqlite = ["rusqlite"] trash-support = ["trash"] [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.99.2" } -nu-test-support = { path = "../nu-test-support", version = "0.99.2" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.100.1" } +nu-test-support = { path = "../nu-test-support", version = "0.100.1" } dirs = { workspace = true } mockito = { workspace = true, default-features = false } diff --git a/crates/nu-command/src/network/http/post.rs b/crates/nu-command/src/network/http/post.rs index 1d144f7d16..597f9478b9 100644 --- a/crates/nu-command/src/network/http/post.rs +++ b/crates/nu-command/src/network/http/post.rs @@ -128,8 +128,13 @@ impl Command for SubCommand { result: None, }, Example { - description: "Upload a file to example.com", - example: "http post --content-type multipart/form-data https://www.example.com { file: (open -r file.mp3 | into binary) }", + description: "Upload a binary file to example.com", + example: "http post --content-type multipart/form-data https://www.example.com { file: (open -r file.mp3) }", + result: None, + }, + Example { + description: "Convert a text file into binary and upload it to example.com", + example: "http post --content-type multipart/form-data https://www.example.com { file: (open -r file.txt | into binary) }", result: None, }, ] diff --git a/crates/nu-command/tests/commands/mut_.rs b/crates/nu-command/tests/commands/mut_.rs index e66348f8f2..52aa9fcff1 100644 --- a/crates/nu-command/tests/commands/mut_.rs +++ b/crates/nu-command/tests/commands/mut_.rs @@ -141,3 +141,10 @@ fn mut_raw_string() { let actual = nu!(r#"mut x = r#'abc'#; $x"#); assert_eq!(actual.out, "abc"); } + +#[test] +fn def_should_not_mutate_mut() { + let actual = nu!("mut a = 3; def foo [] { $a = 4}"); + assert!(actual.err.contains("capture of mutable variable")); + assert!(!actual.status.success()) +} diff --git a/crates/nu-derive-value/Cargo.toml b/crates/nu-derive-value/Cargo.toml index 84d46076d7..edb3709af9 100644 --- a/crates/nu-derive-value/Cargo.toml +++ b/crates/nu-derive-value/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu-derive-value" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-derive-value" -version = "0.99.2" +version = "0.100.1" [lib] proc-macro = true diff --git a/crates/nu-engine/Cargo.toml b/crates/nu-engine/Cargo.toml index 47afe10bb2..dfe634d078 100644 --- a/crates/nu-engine/Cargo.toml +++ b/crates/nu-engine/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-engine" edition = "2021" license = "MIT" name = "nu-engine" -version = "0.99.2" +version = "0.100.1" [lib] bench = false @@ -14,10 +14,10 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", features = ["plugin"], version = "0.99.2" } -nu-path = { path = "../nu-path", version = "0.99.2" } -nu-glob = { path = "../nu-glob", version = "0.99.2" } -nu-utils = { path = "../nu-utils", version = "0.99.2" } +nu-protocol = { path = "../nu-protocol", features = ["plugin"], version = "0.100.1" } +nu-path = { path = "../nu-path", version = "0.100.1" } +nu-glob = { path = "../nu-glob", version = "0.100.1" } +nu-utils = { path = "../nu-utils", version = "0.100.1" } log = { workspace = true } terminal_size = { workspace = true } diff --git a/crates/nu-explore/Cargo.toml b/crates/nu-explore/Cargo.toml index da3beb68b8..6ea09e3f13 100644 --- a/crates/nu-explore/Cargo.toml +++ b/crates/nu-explore/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-explore" edition = "2021" license = "MIT" name = "nu-explore" -version = "0.99.2" +version = "0.100.1" [lib] bench = false @@ -14,16 +14,16 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } -nu-parser = { path = "../nu-parser", version = "0.99.2" } -nu-path = { path = "../nu-path", version = "0.99.2" } -nu-color-config = { path = "../nu-color-config", version = "0.99.2" } -nu-engine = { path = "../nu-engine", version = "0.99.2" } -nu-table = { path = "../nu-table", version = "0.99.2" } -nu-json = { path = "../nu-json", version = "0.99.2" } -nu-utils = { path = "../nu-utils", version = "0.99.2" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } +nu-parser = { path = "../nu-parser", version = "0.100.1" } +nu-path = { path = "../nu-path", version = "0.100.1" } +nu-color-config = { path = "../nu-color-config", version = "0.100.1" } +nu-engine = { path = "../nu-engine", version = "0.100.1" } +nu-table = { path = "../nu-table", version = "0.100.1" } +nu-json = { path = "../nu-json", version = "0.100.1" } +nu-utils = { path = "../nu-utils", version = "0.100.1" } nu-ansi-term = { workspace = true } -nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.99.2" } +nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.100.1" } anyhow = { workspace = true } log = { workspace = true } diff --git a/crates/nu-glob/Cargo.toml b/crates/nu-glob/Cargo.toml index 30b3b7654d..25265c805a 100644 --- a/crates/nu-glob/Cargo.toml +++ b/crates/nu-glob/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nu-glob" -version = "0.99.2" +version = "0.100.1" authors = ["The Nushell Project Developers", "The Rust Project Developers"] license = "MIT/Apache-2.0" description = """ diff --git a/crates/nu-glob/src/lib.rs b/crates/nu-glob/src/lib.rs index 2a3f861983..602500fa1a 100644 --- a/crates/nu-glob/src/lib.rs +++ b/crates/nu-glob/src/lib.rs @@ -1144,18 +1144,28 @@ mod test { use std::io; let mut iter = glob("/root/*").unwrap(); - // Skip test if running with permissions to read /root - if std::fs::read_dir("/root/").is_err() { - // GlobErrors shouldn't halt iteration - let next = iter.next(); - assert!(next.is_some()); + match std::fs::read_dir("/root/") { + // skip if running with permissions to read /root + Ok(_) => {} - let err = next.unwrap(); - assert!(err.is_err()); + // skip if /root doesn't exist + Err(err) if err.kind() == io::ErrorKind::NotFound => { + assert!(iter.count() == 0); + } - let err = err.err().unwrap(); - assert!(err.path() == Path::new("/root")); - assert!(err.error().kind() == io::ErrorKind::PermissionDenied); + // should otherwise return a single match with permission error + Err(_) => { + // GlobErrors shouldn't halt iteration + let next = iter.next(); + assert!(next.is_some()); + + let err = next.unwrap(); + assert!(err.is_err()); + + let err = err.err().unwrap(); + assert!(err.path() == Path::new("/root")); + assert!(err.error().kind() == io::ErrorKind::PermissionDenied); + } } } diff --git a/crates/nu-json/Cargo.toml b/crates/nu-json/Cargo.toml index a964b2d81c..507ae911df 100644 --- a/crates/nu-json/Cargo.toml +++ b/crates/nu-json/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-json" edition = "2021" license = "MIT" name = "nu-json" -version = "0.99.2" +version = "0.100.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -26,8 +26,8 @@ serde = { workspace = true } serde_json = { workspace = true } [dev-dependencies] -nu-test-support = { path = "../nu-test-support", version = "0.99.2" } -nu-path = { path = "../nu-path", version = "0.99.2" } +nu-test-support = { path = "../nu-test-support", version = "0.100.1" } +nu-path = { path = "../nu-path", version = "0.100.1" } serde_json = "1.0" fancy-regex = "0.14.0" diff --git a/crates/nu-lsp/Cargo.toml b/crates/nu-lsp/Cargo.toml index 4aecc2834b..2798dc5182 100644 --- a/crates/nu-lsp/Cargo.toml +++ b/crates/nu-lsp/Cargo.toml @@ -3,14 +3,14 @@ authors = ["The Nushell Project Developers"] description = "Nushell's integrated LSP server" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-lsp" name = "nu-lsp" -version = "0.99.2" +version = "0.100.1" edition = "2021" license = "MIT" [dependencies] -nu-cli = { path = "../nu-cli", version = "0.99.2" } -nu-parser = { path = "../nu-parser", version = "0.99.2" } -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } +nu-cli = { path = "../nu-cli", version = "0.100.1" } +nu-parser = { path = "../nu-parser", version = "0.100.1" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } reedline = { workspace = true } @@ -23,9 +23,9 @@ serde = { workspace = true } serde_json = { workspace = true } [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.99.2" } -nu-command = { path = "../nu-command", version = "0.99.2" } -nu-test-support = { path = "../nu-test-support", version = "0.99.2" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.100.1" } +nu-command = { path = "../nu-command", version = "0.100.1" } +nu-test-support = { path = "../nu-test-support", version = "0.100.1" } assert-json-diff = "2.0" diff --git a/crates/nu-parser/Cargo.toml b/crates/nu-parser/Cargo.toml index a64acbbd0b..bfef11acb2 100644 --- a/crates/nu-parser/Cargo.toml +++ b/crates/nu-parser/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-parser" edition = "2021" license = "MIT" name = "nu-parser" -version = "0.99.2" +version = "0.100.1" exclude = ["/fuzz"] [lib] @@ -15,11 +15,11 @@ bench = false workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.99.2" } -nu-path = { path = "../nu-path", version = "0.99.2" } -nu-plugin-engine = { path = "../nu-plugin-engine", optional = true, version = "0.99.2" } -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } -nu-utils = { path = "../nu-utils", version = "0.99.2" } +nu-engine = { path = "../nu-engine", version = "0.100.1" } +nu-path = { path = "../nu-path", version = "0.100.1" } +nu-plugin-engine = { path = "../nu-plugin-engine", optional = true, version = "0.100.1" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } +nu-utils = { path = "../nu-utils", version = "0.100.1" } bytesize = { workspace = true } chrono = { default-features = false, features = ['std'], workspace = true } diff --git a/crates/nu-parser/src/type_check.rs b/crates/nu-parser/src/type_check.rs index 1b66258ded..a7de3800e2 100644 --- a/crates/nu-parser/src/type_check.rs +++ b/crates/nu-parser/src/type_check.rs @@ -88,6 +88,7 @@ pub fn math_result_type( (Type::Float, Type::Number) => (Type::Number, None), (Type::String, Type::String) => (Type::String, None), (Type::Date, Type::Duration) => (Type::Date, None), + (Type::Duration, Type::Date) => (Type::Date, None), (Type::Duration, Type::Duration) => (Type::Duration, None), (Type::Filesize, Type::Filesize) => (Type::Filesize, None), diff --git a/crates/nu-path/Cargo.toml b/crates/nu-path/Cargo.toml index b451a21f75..22ab716d14 100644 --- a/crates/nu-path/Cargo.toml +++ b/crates/nu-path/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-path" edition = "2021" license = "MIT" name = "nu-path" -version = "0.99.2" +version = "0.100.1" exclude = ["/fuzz"] [lib] diff --git a/crates/nu-plugin-core/Cargo.toml b/crates/nu-plugin-core/Cargo.toml index 2f038be2a5..4830859708 100644 --- a/crates/nu-plugin-core/Cargo.toml +++ b/crates/nu-plugin-core/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin-core edition = "2021" license = "MIT" name = "nu-plugin-core" -version = "0.99.2" +version = "0.100.1" [lib] bench = false @@ -14,8 +14,8 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } -nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.99.2", default-features = false } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } +nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.100.1", default-features = false } rmp-serde = { workspace = true } serde = { workspace = true } diff --git a/crates/nu-plugin-engine/Cargo.toml b/crates/nu-plugin-engine/Cargo.toml index 6c59229074..ec6d816f7d 100644 --- a/crates/nu-plugin-engine/Cargo.toml +++ b/crates/nu-plugin-engine/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin-engi edition = "2021" license = "MIT" name = "nu-plugin-engine" -version = "0.99.2" +version = "0.100.1" [lib] bench = false @@ -14,12 +14,12 @@ bench = false workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.99.2" } -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } -nu-system = { path = "../nu-system", version = "0.99.2" } -nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.99.2" } -nu-plugin-core = { path = "../nu-plugin-core", version = "0.99.2", default-features = false } -nu-utils = { path = "../nu-utils", version = "0.99.2" } +nu-engine = { path = "../nu-engine", version = "0.100.1" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } +nu-system = { path = "../nu-system", version = "0.100.1" } +nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.100.1" } +nu-plugin-core = { path = "../nu-plugin-core", version = "0.100.1", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.100.1" } serde = { workspace = true } log = { workspace = true } diff --git a/crates/nu-plugin-protocol/Cargo.toml b/crates/nu-plugin-protocol/Cargo.toml index a98aca5fa4..7659fec8d1 100644 --- a/crates/nu-plugin-protocol/Cargo.toml +++ b/crates/nu-plugin-protocol/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin-prot edition = "2021" license = "MIT" name = "nu-plugin-protocol" -version = "0.99.2" +version = "0.100.1" [lib] bench = false @@ -14,8 +14,8 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.99.2", features = ["plugin"] } -nu-utils = { path = "../nu-utils", version = "0.99.2" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1", features = ["plugin"] } +nu-utils = { path = "../nu-utils", version = "0.100.1" } rmp-serde = { workspace = true } serde = { workspace = true, features = ["derive"] } diff --git a/crates/nu-plugin-test-support/Cargo.toml b/crates/nu-plugin-test-support/Cargo.toml index 880c9b87a7..d0c415acd7 100644 --- a/crates/nu-plugin-test-support/Cargo.toml +++ b/crates/nu-plugin-test-support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nu-plugin-test-support" -version = "0.99.2" +version = "0.100.1" edition = "2021" license = "MIT" description = "Testing support for Nushell plugins" @@ -15,14 +15,14 @@ workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nu-engine = { path = "../nu-engine", version = "0.99.2", features = ["plugin"] } -nu-protocol = { path = "../nu-protocol", version = "0.99.2", features = ["plugin"] } -nu-parser = { path = "../nu-parser", version = "0.99.2", features = ["plugin"] } -nu-plugin = { path = "../nu-plugin", version = "0.99.2" } -nu-plugin-core = { path = "../nu-plugin-core", version = "0.99.2" } -nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.99.2" } -nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.99.2" } -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.99.2" } +nu-engine = { path = "../nu-engine", version = "0.100.1", features = ["plugin"] } +nu-protocol = { path = "../nu-protocol", version = "0.100.1", features = ["plugin"] } +nu-parser = { path = "../nu-parser", version = "0.100.1", features = ["plugin"] } +nu-plugin = { path = "../nu-plugin", version = "0.100.1" } +nu-plugin-core = { path = "../nu-plugin-core", version = "0.100.1" } +nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.100.1" } +nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.100.1" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.100.1" } nu-ansi-term = { workspace = true } similar = "2.6" diff --git a/crates/nu-plugin/Cargo.toml b/crates/nu-plugin/Cargo.toml index 69c4c76f58..a2c328375e 100644 --- a/crates/nu-plugin/Cargo.toml +++ b/crates/nu-plugin/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin" edition = "2021" license = "MIT" name = "nu-plugin" -version = "0.99.2" +version = "0.100.1" [lib] bench = false @@ -14,11 +14,11 @@ bench = false workspace = true [dependencies] -nu-engine = { path = "../nu-engine", version = "0.99.2" } -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } -nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.99.2" } -nu-plugin-core = { path = "../nu-plugin-core", version = "0.99.2", default-features = false } -nu-utils = { path = "../nu-utils", version = "0.99.2" } +nu-engine = { path = "../nu-engine", version = "0.100.1" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } +nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.100.1" } +nu-plugin-core = { path = "../nu-plugin-core", version = "0.100.1", default-features = false } +nu-utils = { path = "../nu-utils", version = "0.100.1" } log = { workspace = true } thiserror = "1.0" diff --git a/crates/nu-pretty-hex/Cargo.toml b/crates/nu-pretty-hex/Cargo.toml index 534f9d4304..9fda277a5d 100644 --- a/crates/nu-pretty-hex/Cargo.toml +++ b/crates/nu-pretty-hex/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-pretty-hex" edition = "2021" license = "MIT" name = "nu-pretty-hex" -version = "0.99.2" +version = "0.100.1" [lib] doctest = false diff --git a/crates/nu-protocol/Cargo.toml b/crates/nu-protocol/Cargo.toml index a6b05474b1..60d6c10acc 100644 --- a/crates/nu-protocol/Cargo.toml +++ b/crates/nu-protocol/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-protocol" edition = "2021" license = "MIT" name = "nu-protocol" -version = "0.99.2" +version = "0.100.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -16,10 +16,10 @@ bench = false workspace = true [dependencies] -nu-utils = { path = "../nu-utils", version = "0.99.2" } -nu-path = { path = "../nu-path", version = "0.99.2" } -nu-system = { path = "../nu-system", version = "0.99.2" } -nu-derive-value = { path = "../nu-derive-value", version = "0.99.2" } +nu-utils = { path = "../nu-utils", version = "0.100.1" } +nu-path = { path = "../nu-path", version = "0.100.1" } +nu-system = { path = "../nu-system", version = "0.100.1" } +nu-derive-value = { path = "../nu-derive-value", version = "0.100.1" } brotli = { workspace = true, optional = true } bytes = { workspace = true } @@ -58,8 +58,8 @@ plugin = [ serde_json = { workspace = true } strum = "0.26" strum_macros = "0.26" -nu-test-support = { path = "../nu-test-support", version = "0.99.2" } -nu-utils = { path = "../nu-utils", version = "0.99.2" } +nu-test-support = { path = "../nu-test-support", version = "0.100.1" } +nu-utils = { path = "../nu-utils", version = "0.100.1" } pretty_assertions = { workspace = true } rstest = { workspace = true } tempfile = { workspace = true } diff --git a/crates/nu-protocol/src/value/mod.rs b/crates/nu-protocol/src/value/mod.rs index 26d8384cee..1a1e8fada2 100644 --- a/crates/nu-protocol/src/value/mod.rs +++ b/crates/nu-protocol/src/value/mod.rs @@ -2444,6 +2444,17 @@ impl Value { Ok(Value::string(lhs.to_string() + rhs, span)) } + (Value::Duration { val: lhs, .. }, Value::Date { val: rhs, .. }) => { + if let Some(val) = rhs.checked_add_signed(chrono::Duration::nanoseconds(*lhs)) { + Ok(Value::date(val, span)) + } else { + Err(ShellError::OperatorOverflow { + msg: "addition operation overflowed".into(), + span, + help: None, + }) + } + } (Value::Date { val: lhs, .. }, Value::Duration { val: rhs, .. }) => { if let Some(val) = lhs.checked_add_signed(chrono::Duration::nanoseconds(*rhs)) { Ok(Value::date(val, span)) diff --git a/crates/nu-std/Cargo.toml b/crates/nu-std/Cargo.toml index a96728bb8f..a6c48cac3c 100644 --- a/crates/nu-std/Cargo.toml +++ b/crates/nu-std/Cargo.toml @@ -5,12 +5,12 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-std" edition = "2021" license = "MIT" name = "nu-std" -version = "0.99.2" +version = "0.100.1" [dependencies] -nu-parser = { version = "0.99.2", path = "../nu-parser" } -nu-protocol = { version = "0.99.2", path = "../nu-protocol" } -nu-engine = { version = "0.99.2", path = "../nu-engine" } +nu-parser = { version = "0.100.1", path = "../nu-parser" } +nu-protocol = { version = "0.100.1", path = "../nu-protocol" } +nu-engine = { version = "0.100.1", path = "../nu-engine" } miette = { workspace = true, features = ["fancy-no-backtrace"] } log = "0.4" diff --git a/crates/nu-system/Cargo.toml b/crates/nu-system/Cargo.toml index 4ac5cccb8d..ec435f1f3d 100644 --- a/crates/nu-system/Cargo.toml +++ b/crates/nu-system/Cargo.toml @@ -3,7 +3,7 @@ authors = ["The Nushell Project Developers", "procs creators"] description = "Nushell system querying" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-system" name = "nu-system" -version = "0.99.2" +version = "0.100.1" edition = "2021" license = "MIT" diff --git a/crates/nu-table/Cargo.toml b/crates/nu-table/Cargo.toml index b0fdf92273..c5ddb41f52 100644 --- a/crates/nu-table/Cargo.toml +++ b/crates/nu-table/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-table" edition = "2021" license = "MIT" name = "nu-table" -version = "0.99.2" +version = "0.100.1" [lib] bench = false @@ -14,14 +14,14 @@ bench = false workspace = true [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } -nu-utils = { path = "../nu-utils", version = "0.99.2" } -nu-engine = { path = "../nu-engine", version = "0.99.2" } -nu-color-config = { path = "../nu-color-config", version = "0.99.2" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } +nu-utils = { path = "../nu-utils", version = "0.100.1" } +nu-engine = { path = "../nu-engine", version = "0.100.1" } +nu-color-config = { path = "../nu-color-config", version = "0.100.1" } nu-ansi-term = { workspace = true } fancy-regex = { workspace = true } tabled = { workspace = true, features = ["ansi"], default-features = false } terminal_size = { workspace = true } [dev-dependencies] -# nu-test-support = { path="../nu-test-support", version = "0.99.2" } \ No newline at end of file +# nu-test-support = { path="../nu-test-support", version = "0.100.1" } \ No newline at end of file diff --git a/crates/nu-term-grid/Cargo.toml b/crates/nu-term-grid/Cargo.toml index 70d4ae3cd7..a9fea5e78b 100644 --- a/crates/nu-term-grid/Cargo.toml +++ b/crates/nu-term-grid/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-term-grid" edition = "2021" license = "MIT" name = "nu-term-grid" -version = "0.99.2" +version = "0.100.1" [lib] bench = false @@ -14,6 +14,6 @@ bench = false workspace = true [dependencies] -nu-utils = { path = "../nu-utils", version = "0.99.2" } +nu-utils = { path = "../nu-utils", version = "0.100.1" } unicode-width = { workspace = true } \ No newline at end of file diff --git a/crates/nu-test-support/Cargo.toml b/crates/nu-test-support/Cargo.toml index 3bacc808b2..878b31e4ec 100644 --- a/crates/nu-test-support/Cargo.toml +++ b/crates/nu-test-support/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-test-suppor edition = "2021" license = "MIT" name = "nu-test-support" -version = "0.99.2" +version = "0.100.1" [lib] doctest = false @@ -15,9 +15,9 @@ bench = false workspace = true [dependencies] -nu-path = { path = "../nu-path", version = "0.99.2" } -nu-glob = { path = "../nu-glob", version = "0.99.2" } -nu-utils = { path = "../nu-utils", version = "0.99.2" } +nu-path = { path = "../nu-path", version = "0.100.1" } +nu-glob = { path = "../nu-glob", version = "0.100.1" } +nu-utils = { path = "../nu-utils", version = "0.100.1" } num-format = { workspace = true } which = { workspace = true } diff --git a/crates/nu-utils/Cargo.toml b/crates/nu-utils/Cargo.toml index a2a608fbaf..4b590e6831 100644 --- a/crates/nu-utils/Cargo.toml +++ b/crates/nu-utils/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu-utils" repository = "https://github.com/nushell/nushell/tree/main/crates/nu-utils" -version = "0.99.2" +version = "0.100.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [[bin]] diff --git a/crates/nu-utils/src/sample_config/default_config.nu b/crates/nu-utils/src/sample_config/default_config.nu index 7fd39cf460..c8b398b684 100644 --- a/crates/nu-utils/src/sample_config/default_config.nu +++ b/crates/nu-utils/src/sample_config/default_config.nu @@ -1,6 +1,6 @@ # Nushell Config File # -# version = "0.99.2" +# version = "0.100.1" # For more information on defining custom themes, see # https://www.nushell.sh/book/coloring_and_theming.html diff --git a/crates/nu-utils/src/sample_config/default_env.nu b/crates/nu-utils/src/sample_config/default_env.nu index 73605ef71b..fb527dc112 100644 --- a/crates/nu-utils/src/sample_config/default_env.nu +++ b/crates/nu-utils/src/sample_config/default_env.nu @@ -1,6 +1,6 @@ # Nushell Environment Config File # -# version = "0.99.2" +# version = "0.100.1" def create_left_prompt [] { let dir = match (do --ignore-shell-errors { $env.PWD | path relative-to $nu.home-path }) { diff --git a/crates/nu_plugin_custom_values/Cargo.toml b/crates/nu_plugin_custom_values/Cargo.toml index ef494a9355..d6e2a4f897 100644 --- a/crates/nu_plugin_custom_values/Cargo.toml +++ b/crates/nu_plugin_custom_values/Cargo.toml @@ -10,10 +10,10 @@ name = "nu_plugin_custom_values" bench = false [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.99.2" } -nu-protocol = { path = "../nu-protocol", version = "0.99.2", features = ["plugin"] } +nu-plugin = { path = "../nu-plugin", version = "0.100.1" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1", features = ["plugin"] } serde = { workspace = true } typetag = "0.2" [dev-dependencies] -nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.99.2" } \ No newline at end of file +nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.100.1" } \ No newline at end of file diff --git a/crates/nu_plugin_example/Cargo.toml b/crates/nu_plugin_example/Cargo.toml index b75b9bd584..adeef60167 100644 --- a/crates/nu_plugin_example/Cargo.toml +++ b/crates/nu_plugin_example/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_exam edition = "2021" license = "MIT" name = "nu_plugin_example" -version = "0.99.2" +version = "0.100.1" [[bin]] name = "nu_plugin_example" @@ -15,9 +15,9 @@ bench = false bench = false [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.99.2" } -nu-protocol = { path = "../nu-protocol", version = "0.99.2", features = ["plugin"] } +nu-plugin = { path = "../nu-plugin", version = "0.100.1" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1", features = ["plugin"] } [dev-dependencies] -nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.99.2" } -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.99.2" } \ No newline at end of file +nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.100.1" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.100.1" } \ No newline at end of file diff --git a/crates/nu_plugin_formats/Cargo.toml b/crates/nu_plugin_formats/Cargo.toml index 96e89a468e..2a09d61f58 100644 --- a/crates/nu_plugin_formats/Cargo.toml +++ b/crates/nu_plugin_formats/Cargo.toml @@ -5,12 +5,12 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_form edition = "2021" license = "MIT" name = "nu_plugin_formats" -version = "0.99.2" +version = "0.100.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.99.2" } -nu-protocol = { path = "../nu-protocol", version = "0.99.2", features = ["plugin"] } +nu-plugin = { path = "../nu-plugin", version = "0.100.1" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1", features = ["plugin"] } indexmap = { workspace = true } eml-parser = "0.1" @@ -20,4 +20,4 @@ plist = "1.7" chrono = "0.4" [dev-dependencies] -nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.99.2" } \ No newline at end of file +nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.100.1" } \ No newline at end of file diff --git a/crates/nu_plugin_gstat/Cargo.toml b/crates/nu_plugin_gstat/Cargo.toml index 80aea009c3..dcfdd32cc0 100644 --- a/crates/nu_plugin_gstat/Cargo.toml +++ b/crates/nu_plugin_gstat/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_gsta edition = "2021" license = "MIT" name = "nu_plugin_gstat" -version = "0.99.2" +version = "0.100.1" [lib] doctest = false @@ -16,7 +16,7 @@ name = "nu_plugin_gstat" bench = false [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.99.2" } -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } +nu-plugin = { path = "../nu-plugin", version = "0.100.1" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } git2 = "0.19" \ No newline at end of file diff --git a/crates/nu_plugin_inc/Cargo.toml b/crates/nu_plugin_inc/Cargo.toml index 9ff3051a8e..8870224397 100644 --- a/crates/nu_plugin_inc/Cargo.toml +++ b/crates/nu_plugin_inc/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_inc" edition = "2021" license = "MIT" name = "nu_plugin_inc" -version = "0.99.2" +version = "0.100.1" [lib] doctest = false @@ -16,7 +16,7 @@ name = "nu_plugin_inc" bench = false [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.99.2" } -nu-protocol = { path = "../nu-protocol", version = "0.99.2", features = ["plugin"] } +nu-plugin = { path = "../nu-plugin", version = "0.100.1" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1", features = ["plugin"] } semver = "1.0" \ No newline at end of file diff --git a/crates/nu_plugin_nu_example/nu_plugin_nu_example.nu b/crates/nu_plugin_nu_example/nu_plugin_nu_example.nu index 9967348c6d..f13b82a711 100755 --- a/crates/nu_plugin_nu_example/nu_plugin_nu_example.nu +++ b/crates/nu_plugin_nu_example/nu_plugin_nu_example.nu @@ -6,7 +6,7 @@ # it also allows us to test the plugin interface with something manually implemented in a scripting # language without adding any extra dependencies to our tests. -const NUSHELL_VERSION = "0.99.2" +const NUSHELL_VERSION = "0.100.1" const PLUGIN_VERSION = "0.1.1" # bump if you change commands! def main [--stdio] { diff --git a/crates/nu_plugin_polars/Cargo.toml b/crates/nu_plugin_polars/Cargo.toml index 52a51dc3f4..fafbb8cb7d 100644 --- a/crates/nu_plugin_polars/Cargo.toml +++ b/crates/nu_plugin_polars/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT" name = "nu_plugin_polars" repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_polars" -version = "0.99.2" +version = "0.100.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -17,10 +17,10 @@ bench = false bench = false [dependencies] -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } -nu-plugin = { path = "../nu-plugin", version = "0.99.2" } -nu-path = { path = "../nu-path", version = "0.99.2" } -nu-utils = { path = "../nu-utils", version = "0.99.2" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } +nu-plugin = { path = "../nu-plugin", version = "0.100.1" } +nu-path = { path = "../nu-path", version = "0.100.1" } +nu-utils = { path = "../nu-utils", version = "0.100.1" } # Potential dependencies for extras chrono = { workspace = true, features = ["std", "unstable-locales"], default-features = false } @@ -84,9 +84,9 @@ optional = false version = "0.43" [dev-dependencies] -nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.99.2" } -nu-engine = { path = "../nu-engine", version = "0.99.2" } -nu-parser = { path = "../nu-parser", version = "0.99.2" } -nu-command = { path = "../nu-command", version = "0.99.2" } -nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.99.2" } +nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.100.1" } +nu-engine = { path = "../nu-engine", version = "0.100.1" } +nu-parser = { path = "../nu-parser", version = "0.100.1" } +nu-command = { path = "../nu-command", version = "0.100.1" } +nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.100.1" } tempfile.workspace = true diff --git a/crates/nu_plugin_python/nu_plugin_python_example.py b/crates/nu_plugin_python/nu_plugin_python_example.py index fdad98ecd8..b77b1a0ddd 100755 --- a/crates/nu_plugin_python/nu_plugin_python_example.py +++ b/crates/nu_plugin_python/nu_plugin_python_example.py @@ -27,7 +27,7 @@ import sys import json -NUSHELL_VERSION = "0.99.2" +NUSHELL_VERSION = "0.100.1" PLUGIN_VERSION = "0.1.1" # bump if you change commands! diff --git a/crates/nu_plugin_query/Cargo.toml b/crates/nu_plugin_query/Cargo.toml index a6d78c7162..431b728f62 100644 --- a/crates/nu_plugin_query/Cargo.toml +++ b/crates/nu_plugin_query/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_quer edition = "2021" license = "MIT" name = "nu_plugin_query" -version = "0.99.2" +version = "0.100.1" [lib] doctest = false @@ -16,8 +16,8 @@ name = "nu_plugin_query" bench = false [dependencies] -nu-plugin = { path = "../nu-plugin", version = "0.99.2" } -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } +nu-plugin = { path = "../nu-plugin", version = "0.100.1" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } gjson = "0.8" scraper = { default-features = false, version = "0.21" } diff --git a/crates/nu_plugin_stress_internals/Cargo.toml b/crates/nu_plugin_stress_internals/Cargo.toml index b61acf4d3e..9f5be89dc0 100644 --- a/crates/nu_plugin_stress_internals/Cargo.toml +++ b/crates/nu_plugin_stress_internals/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_stre edition = "2021" license = "MIT" name = "nu_plugin_stress_internals" -version = "0.99.2" +version = "0.100.1" [[bin]] name = "nu_plugin_stress_internals" diff --git a/crates/nuon/Cargo.toml b/crates/nuon/Cargo.toml index edaa2d1072..4ba31b2a4a 100644 --- a/crates/nuon/Cargo.toml +++ b/crates/nuon/Cargo.toml @@ -5,15 +5,15 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nuon" edition = "2021" license = "MIT" name = "nuon" -version = "0.99.2" +version = "0.100.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nu-parser = { path = "../nu-parser", version = "0.99.2" } -nu-protocol = { path = "../nu-protocol", version = "0.99.2" } -nu-engine = { path = "../nu-engine", version = "0.99.2" } -nu-utils = { path = "../nu-utils", version = "0.99.2" } +nu-parser = { path = "../nu-parser", version = "0.100.1" } +nu-protocol = { path = "../nu-protocol", version = "0.100.1" } +nu-engine = { path = "../nu-engine", version = "0.100.1" } +nu-utils = { path = "../nu-utils", version = "0.100.1" } [dev-dependencies] chrono = { workspace = true } diff --git a/tests/repl/test_type_check.rs b/tests/repl/test_type_check.rs index 8a00f2f486..95ef7f4323 100644 --- a/tests/repl/test_type_check.rs +++ b/tests/repl/test_type_check.rs @@ -37,6 +37,11 @@ fn date_minus_duration() -> TestResult { run_test(input, expected) } +#[test] +fn duration_minus_date_not_supported() -> TestResult { + fail_test("2day - 2023-04-22", "doesn't support these values") +} + #[test] fn date_plus_duration() -> TestResult { let input = "2023-04-18 + 2day | format date %Y-%m-%d"; @@ -44,6 +49,13 @@ fn date_plus_duration() -> TestResult { run_test(input, expected) } +#[test] +fn duration_plus_date() -> TestResult { + let input = "2024-11-10T00:00:00-00:00 + 4hr | format date"; + let expected = "Sun, 10 Nov 2024 04:00:00 +0000"; + run_test(input, expected) +} + #[test] fn block_not_first_class_def() -> TestResult { fail_test(