Skip to content

Commit

Permalink
Merge branch 'jtran/fix-ts_rs' into achalmers/no-more-empty
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchalmers committed Sep 20, 2024
2 parents 746a540 + fc64004 commit 80112c7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/lang/abstractSyntaxTree.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1766,17 +1766,17 @@ const key = 'c'`
const ast = parse(code)
if (err(ast)) throw ast
const { nonCodeMeta } = ast
expect(nonCodeMeta.nonCodeNodes[0][0]).toEqual(nonCodeMetaInstance)
expect(nonCodeMeta.nonCodeNodes[0]?.[0]).toEqual(nonCodeMetaInstance)

// extra whitespace won't change it's position (0) or value (NB the start end would have changed though)
const codeWithExtraStartWhitespace = '\n\n\n' + code
const ast2 = parse(codeWithExtraStartWhitespace)
if (err(ast2)) throw ast2
const { nonCodeMeta: nonCodeMeta2 } = ast2
expect(nonCodeMeta2.nonCodeNodes[0][0].value).toStrictEqual(
expect(nonCodeMeta2.nonCodeNodes[0]?.[0].value).toStrictEqual(
nonCodeMetaInstance.value
)
expect(nonCodeMeta2.nonCodeNodes[0][0].start).not.toBe(
expect(nonCodeMeta2.nonCodeNodes[0]?.[0].start).not.toBe(
nonCodeMetaInstance.start
)
})
Expand Down
13 changes: 7 additions & 6 deletions src/wasm-lib/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/wasm-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ rust-version = "1.73"
crate-type = ["cdylib"]

[dependencies]
bson = { version = "2.12.0", features = ["uuid-1", "chrono"] }
bson = { version = "2.13.0", features = ["uuid-1", "chrono"] }
data-encoding = "2.6.0"
gloo-utils = "0.2.0"
kcl-lib = { path = "kcl" }
Expand Down
4 changes: 2 additions & 2 deletions src/wasm-lib/kcl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ sha2 = "0.10.8"
tabled = { version = "0.15.0", optional = true }
thiserror = "1.0.63"
toml = "0.8.19"
ts-rs = { version = "9.0.1", features = ["uuid-impl", "url-impl", "chrono-impl", "no-serde-warnings", "serde-json-impl"] }
ts-rs = { version = "10.0.0", features = ["uuid-impl", "url-impl", "chrono-impl", "no-serde-warnings", "serde-json-impl"] }
url = { version = "2.5.2", features = ["serde"] }
urlencoding = "2.1.3"
uuid = { version = "1.10.0", features = ["v4", "js", "serde"] }
Expand All @@ -62,7 +62,7 @@ web-sys = { version = "0.3.69", features = ["console"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
approx = "0.5"
bson = { version = "2.12.0", features = ["uuid-1", "chrono"] }
bson = { version = "2.13.0", features = ["uuid-1", "chrono"] }
tokio = { version = "1.39.3", features = ["full"] }
tokio-tungstenite = { version = "0.24.0", features = ["rustls-tls-native-roots"] }
tower-lsp = { version = "0.20.0", features = ["proposed"] }
Expand Down
3 changes: 2 additions & 1 deletion src/wasm-lib/kcl/src/docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ pub struct StdLibFnData {

/// This struct defines a single argument to a stdlib function.
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, JsonSchema, ts_rs::TS)]
#[ts(export)]
// There's a bug in ts_rs where this isn't correctly imported by StdLibFnData.
#[ts(export_to = "StdLibFnData.ts")]
#[serde(rename_all = "camelCase")]
pub struct StdLibFnArg {
/// The name of the argument.
Expand Down

0 comments on commit 80112c7

Please sign in to comment.