Butta
5 years ago
committed by
Leonid Plyushch
4 changed files with 67 additions and 0 deletions
@ -0,0 +1,13 @@ |
|||||
|
diff --git a/Cargo.toml b/Cargo.toml
|
||||
|
index 8e1e767b..36f5c442 100644
|
||||
|
--- a/Cargo.toml
|
||||
|
+++ b/Cargo.toml
|
||||
|
@@ -61,7 +61,7 @@ nu-build = { version = "0.13.0", path = "./crates/nu-build" }
|
||||
|
# Test executables |
||||
|
test-bins = [] |
||||
|
|
||||
|
-default = ["sys", "ps", "textview", "inc", "str"]
|
||||
|
+default = ["textview", "inc", "str"]
|
||||
|
stable = ["default", "starship-prompt", "binaryview", "match", "tree", "average", "post", "fetch", "clipboard-cli", "trash-support"] |
||||
|
|
||||
|
# Default |
@ -0,0 +1,8 @@ |
|||||
|
TERMUX_PKG_HOMEPAGE=https://www.nushell.sh |
||||
|
TERMUX_PKG_DESCRIPTION="A new type of shell operating on structured data" |
||||
|
TERMUX_PKG_LICENSE="MIT" |
||||
|
TERMUX_PKG_VERSION=0.13.0 |
||||
|
TERMUX_PKG_SRCURL=https://github.com/nushell/nushell/archive/$TERMUX_PKG_VERSION.tar.gz |
||||
|
TERMUX_PKG_SHA256=a07f730fa5dfe96ea3104b1cc13d2e72951a754870f22fb0dac6e30a359c6d8e |
||||
|
TERMUX_PKG_DEPENDS="zlib" |
||||
|
TERMUX_PKG_BUILD_IN_SRC=true |
@ -0,0 +1,13 @@ |
|||||
|
diff --git a/crates/nu-cli/Cargo.toml b/crates/nu-cli/Cargo.toml
|
||||
|
index 6368b7b8..720bd6b6 100644
|
||||
|
--- a/crates/nu-cli/Cargo.toml
|
||||
|
+++ b/crates/nu-cli/Cargo.toml
|
||||
|
@@ -24,7 +24,7 @@ app_dirs = "1.2.1"
|
||||
|
async-stream = "0.2" |
||||
|
base64 = "0.12.0" |
||||
|
bigdecimal = { version = "0.1.0", features = ["serde"] } |
||||
|
-bson = { version = "0.14.1", features = ["decimal128"] }
|
||||
|
+bson = "0.14.1"
|
||||
|
byte-unit = "3.0.3" |
||||
|
bytes = "0.5.4" |
||||
|
calamine = "0.16" |
@ -0,0 +1,33 @@ |
|||||
|
diff --git a/crates/nu-cli/src/commands/from_bson.rs b/crates/nu-cli/src/commands/from_bson.rs
|
||||
|
index 92849e67..599c08f5 100644
|
||||
|
--- a/crates/nu-cli/src/commands/from_bson.rs
|
||||
|
+++ b/crates/nu-cli/src/commands/from_bson.rs
|
||||
|
@@ -74,18 +74,18 @@ fn convert_bson_value_to_nu_value(v: &Bson, tag: impl Into<Tag>) -> Result<Value
|
||||
|
} |
||||
|
Bson::I32(n) => UntaggedValue::int(*n).into_value(&tag), |
||||
|
Bson::I64(n) => UntaggedValue::int(*n).into_value(&tag), |
||||
|
- Bson::Decimal128(n) => {
|
||||
|
+ //Bson::Decimal128(n) => {
|
||||
|
// TODO: this really isn't great, and we should update this to do a higher |
||||
|
// fidelity translation |
||||
|
- let decimal = BigDecimal::from_str(&format!("{}", n)).map_err(|_| {
|
||||
|
- ShellError::range_error(
|
||||
|
- ExpectedRange::BigDecimal,
|
||||
|
- &n.spanned(span),
|
||||
|
- "converting BSON Decimal128 to BigDecimal".to_owned(),
|
||||
|
- )
|
||||
|
- })?;
|
||||
|
- UntaggedValue::Primitive(Primitive::Decimal(decimal)).into_value(&tag)
|
||||
|
- }
|
||||
|
+ //let decimal = BigDecimal::from_str(&format!("{}", n)).map_err(|_| {
|
||||
|
+ //ShellError::range_error(
|
||||
|
+ //ExpectedRange::BigDecimal,
|
||||
|
+ //&n.spanned(span),
|
||||
|
+ //"converting BSON Decimal128 to BigDecimal".to_owned(),
|
||||
|
+ //)
|
||||
|
+ //})?;
|
||||
|
+ //UntaggedValue::Primitive(Primitive::Decimal(decimal)).into_value(&tag)
|
||||
|
+ //}
|
||||
|
Bson::JavaScriptCode(js) => { |
||||
|
let mut collected = TaggedDictBuilder::new(tag.clone()); |
||||
|
collected.insert_value( |
Loading…
Reference in new issue