From cf9086e4e1b81aa751f8e755c8cf047a4ab71e49 Mon Sep 17 00:00:00 2001 From: trivernis Date: Wed, 14 Dec 2022 19:11:15 +0100 Subject: [PATCH] Update nu version --- Cargo.toml | 12 ++-- src/context/bindings.rs | 143 ++++++++++++++++++++-------------------- src/context/builder.rs | 1 + 3 files changed, 80 insertions(+), 76 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 77cfdd0..1b38e73 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "embed-nu" -version = "0.3.5" +version = "0.4.0" edition = "2021" license = "Apache-2.0" repository = "https://github.com/Trivernis/embed-nu" @@ -10,10 +10,10 @@ authors = ["trivernis "] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nu-command = "0.71.0" -nu-engine = "0.71.0" -nu-parser = "0.71.0" -nu-protocol = "0.71.0" -paste = "1.0.9" +nu-command = "0.72.0" +nu-engine = "0.72.0" +nu-parser = "0.72.0" +nu-protocol = "0.72.0" +paste = "1.0.10" rusty-value = { version = "0.6.0", features = ["derive"] } thiserror = "1.0.37" diff --git a/src/context/bindings.rs b/src/context/bindings.rs index ac70067..6acc2bd 100644 --- a/src/context/bindings.rs +++ b/src/context/bindings.rs @@ -16,7 +16,9 @@ pub fn bind_core_commands(engine_state: &mut EngineState) -> CrateResult<()> { engine_state, Alias, Ast, + Break, Commandline, + Continue, Debug, Def, DefEnv, @@ -33,6 +35,7 @@ pub fn bind_core_commands(engine_state: &mut EngineState) -> CrateResult<()> { Extern, For, Help, + HelpOperators, Hide, HideEnv, If, @@ -45,8 +48,12 @@ pub fn bind_core_commands(engine_state: &mut EngineState) -> CrateResult<()> { Let, Metadata, Module, + Mut, + Return, + Try, Use, Version, + While, ) } @@ -56,69 +63,68 @@ pub fn bind_chart_commands(engine_state: &mut EngineState) -> CrateResult<()> { pub fn bind_filter_commands(engine_state: &mut EngineState) -> CrateResult<()> { bind_commands! { - engine_state, - All, - Any, - Append, - Collect, - Columns, - Compact, - Default, - Drop, - DropColumn, - DropNth, - Each, - EachWhile, - Empty, - Every, - Find, - First, - Flatten, - Get, - Group, - GroupBy, - Headers, - Insert, - SplitBy, - Take, - Merge, - Move, - TakeWhile, - TakeUntil, - Last, - Length, - Lines, - ParEach, - Prepend, - Range, - Reduce, - Reject, - Rename, - Reverse, - Roll, - RollDown, - RollUp, - RollLeft, - RollRight, - Rotate, - Select, - Shuffle, - Skip, - SkipUntil, - SkipWhile, - Sort, - SortBy, - SplitList, - Transpose, - Uniq, - Upsert, - Update, - UpdateCells, - Where, - Window, - Wrap, - Zip, - } + engine_state, + All, + Any, + Append, + Collect, + Columns, + Compact, + Default, + Drop, + DropColumn, + DropNth, + Each, + EachWhile, + Empty, + Every, + Find, + First, + Flatten, + Get, + Group, + GroupBy, + Headers, + Insert, + SplitBy, + Take, + Merge, + Move, + TakeWhile, + TakeUntil, + Last, + Length, + Lines, + ParEach, + Prepend, + Range, + Reduce, + Reject, + Rename, + Reverse, + Roll, + RollDown, + RollUp, + RollLeft, + RollRight, + Rotate, + Select, + Shuffle, + Skip, + SkipUntil, + SkipWhile, + Sort, + SortBy, + SplitList, + Transpose, + Uniq, + Upsert, + Update, + UpdateCells, + Where, + Window, + Wrap, + Zip, } } pub fn bind_misc_commands(engine_state: &mut EngineState) -> CrateResult<()> { @@ -151,13 +157,13 @@ pub fn bind_system_commands(engine_state: &mut EngineState) -> CrateResult<()> { NuCheck, Sys, Ps, + Which, } } pub fn bind_string_commands(engine_state: &mut EngineState) -> CrateResult<()> { bind_commands! { engine_state, - BuildString, Char, Decode, Encode, @@ -196,7 +202,7 @@ pub fn bind_string_commands(engine_state: &mut EngineState) -> CrateResult<()> { StrSubstring, StrTrim, StrTitleCase, - StrUpcase + StrUpcase, } } @@ -324,7 +330,6 @@ pub fn bind_format_commands(engine_state: &mut EngineState) -> CrateResult<()> { ToText, ToToml, ToTsv, - ToCsv, Touch, Use, Upsert, @@ -355,6 +360,7 @@ pub fn bind_conversion_commands(engine_state: &mut EngineState) -> CrateResult<( IntoDuration, IntoFilesize, IntoInt, + IntoRecord, IntoString, } } @@ -401,10 +407,7 @@ pub fn bind_network_commands(engine_state: &mut EngineState) -> CrateResult<()> Fetch, Post, Url, - UrlHost, - UrlPath, - UrlQuery, - UrlScheme, + UrlParse, Port, } } diff --git a/src/context/builder.rs b/src/context/builder.rs index 27222ca..c28d5e1 100644 --- a/src/context/builder.rs +++ b/src/context/builder.rs @@ -93,6 +93,7 @@ impl ContextBuilder { name.to_string().into_bytes(), Span::empty(), nu_protocol::Type::Any, + false, ); self.stack.add_var(var_id, value.into_value()); let delta = working_set.render();