Skip to content

Commit c7f0a6c

Browse files
authored
Upgrade to ts-rs 11.0 for TS type fixes (#7581)
* Bump ts-rs from 10.1.0 to 11.0.1 * Fix breaking changes * Fix tsc errors * Update output * Upgrade to kittycad-modeling-cmds 0.2.124 for ts-rs update * Update parser snaps * Update output of gridfinity_bins_stacking_lip sample * Fix missing field in TS unit tests * Fix tsc type error with fixed_size_grid project setting
1 parent e4941cb commit c7f0a6c

File tree

387 files changed

+74834
-24
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

387 files changed

+74834
-24
lines changed

docs/kcl-lang/settings/user.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Whether to show the debug panel, which lets you see various states of the app to
9090
If true, the grid cells will be fixed-size, where the width is your default length unit. If false, the grid will get larger as you zoom out, and smaller as you zoom in.
9191

9292

93-
**Default:** true
93+
**Default:** None
9494

9595

9696
#### modeling

rust/Cargo.lock

Lines changed: 6 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dashmap = { version = "6.1.0" }
3636
http = "1"
3737
indexmap = "2.9.0"
3838
kittycad = { version = "0.3.37", default-features = false, features = ["js", "requests"] }
39-
kittycad-modeling-cmds = { version = "0.2.123", features = ["ts-rs", "websocket"] }
39+
kittycad-modeling-cmds = { version = "0.2.124", features = ["ts-rs", "websocket"] }
4040
lazy_static = "1.5.0"
4141
miette = "7.6.0"
4242
pyo3 = { version = "0.24.2" }

rust/kcl-lib/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ tabled = { version = "0.20.0", optional = true }
7575
tempfile = "3.20"
7676
thiserror = "2.0.0"
7777
toml = "0.8.22"
78-
ts-rs = { version = "10.1.0", features = [
78+
ts-rs = { version = "11.0.1", features = [
7979
"uuid-impl",
8080
"url-impl",
8181
"chrono-impl",

rust/kcl-lib/src/execution/typed_path.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ impl<'de> serde::de::Deserialize<'de> for TypedPath {
188188

189189
impl ts_rs::TS for TypedPath {
190190
type WithoutGenerics = Self;
191+
type OptionInnerType = Self;
191192

192193
fn name() -> String {
193194
"string".to_string()
@@ -209,7 +210,7 @@ impl ts_rs::TS for TypedPath {
209210
std::path::PathBuf::inline_flattened()
210211
}
211212

212-
fn output_path() -> Option<&'static std::path::Path> {
213+
fn output_path() -> Option<std::path::PathBuf> {
213214
std::path::PathBuf::output_path()
214215
}
215216
}

rust/kcl-lib/src/parsing/ast/types/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ pub struct Node<T> {
5656
pub inner: T,
5757
pub start: usize,
5858
pub end: usize,
59-
#[serde(default, skip_serializing_if = "ModuleId::is_top_level")]
6059
pub module_id: ModuleId,
6160
#[serde(default, skip_serializing_if = "Vec::is_empty")]
6261
pub outer_attrs: NodeList<Annotation>,
@@ -1885,7 +1884,6 @@ pub struct ExpressionStatement {
18851884
pub struct CallExpressionKw {
18861885
pub callee: Node<Name>,
18871886
pub unlabeled: Option<Expr>,
1888-
#[serde(default, skip_serializing_if = "Vec::is_empty")]
18891887
pub arguments: Vec<LabeledArg>,
18901888

18911889
#[serde(default, skip_serializing_if = "Option::is_none")]

rust/kcl-lib/src/parsing/snapshots/kcl_lib__parsing__parser__snapshot_math_tests__a.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ expression: actual
1515
"raw": "1",
1616
"start": 0,
1717
"end": 1,
18+
"moduleId": 0,
1819
"commentStart": 0
1920
},
2021
"right": {
@@ -27,9 +28,11 @@ expression: actual
2728
"raw": "2",
2829
"start": 4,
2930
"end": 5,
31+
"moduleId": 0,
3032
"commentStart": 4
3133
},
3234
"start": 0,
3335
"end": 5,
36+
"moduleId": 0,
3437
"commentStart": 0
3538
}

rust/kcl-lib/src/parsing/snapshots/kcl_lib__parsing__parser__snapshot_math_tests__b.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ expression: actual
1515
"raw": "1",
1616
"start": 0,
1717
"end": 1,
18+
"moduleId": 0,
1819
"commentStart": 0
1920
},
2021
"right": {
@@ -27,9 +28,11 @@ expression: actual
2728
"raw": "2",
2829
"start": 2,
2930
"end": 3,
31+
"moduleId": 0,
3032
"commentStart": 2
3133
},
3234
"start": 0,
3335
"end": 3,
36+
"moduleId": 0,
3437
"commentStart": 0
3538
}

rust/kcl-lib/src/parsing/snapshots/kcl_lib__parsing__parser__snapshot_math_tests__c.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ expression: actual
1515
"raw": "1",
1616
"start": 0,
1717
"end": 1,
18+
"moduleId": 0,
1819
"commentStart": 0
1920
},
2021
"right": {
@@ -27,9 +28,11 @@ expression: actual
2728
"raw": "2",
2829
"start": 3,
2930
"end": 4,
31+
"moduleId": 0,
3032
"commentStart": 3
3133
},
3234
"start": 0,
3335
"end": 4,
36+
"moduleId": 0,
3437
"commentStart": 0
3538
}

rust/kcl-lib/src/parsing/snapshots/kcl_lib__parsing__parser__snapshot_math_tests__d.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ expression: actual
1515
"raw": "1",
1616
"start": 0,
1717
"end": 1,
18+
"moduleId": 0,
1819
"commentStart": 0
1920
},
2021
"right": {
@@ -31,6 +32,7 @@ expression: actual
3132
"raw": "2",
3233
"start": 4,
3334
"end": 5,
35+
"moduleId": 0,
3436
"commentStart": 4
3537
},
3638
"right": {
@@ -43,13 +45,16 @@ expression: actual
4345
"raw": "3",
4446
"start": 8,
4547
"end": 9,
48+
"moduleId": 0,
4649
"commentStart": 8
4750
},
4851
"start": 4,
4952
"end": 9,
53+
"moduleId": 0,
5054
"commentStart": 4
5155
},
5256
"start": 0,
5357
"end": 9,
58+
"moduleId": 0,
5459
"commentStart": 0
5560
}

rust/kcl-lib/src/parsing/snapshots/kcl_lib__parsing__parser__snapshot_math_tests__e.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ expression: actual
1515
"raw": "1",
1616
"start": 0,
1717
"end": 1,
18+
"moduleId": 0,
1819
"commentStart": 0
1920
},
2021
"right": {
@@ -31,6 +32,7 @@ expression: actual
3132
"raw": "2",
3233
"start": 6,
3334
"end": 7,
35+
"moduleId": 0,
3436
"commentStart": 6
3537
},
3638
"right": {
@@ -43,13 +45,16 @@ expression: actual
4345
"raw": "3",
4446
"start": 10,
4547
"end": 11,
48+
"moduleId": 0,
4649
"commentStart": 10
4750
},
4851
"start": 6,
4952
"end": 11,
53+
"moduleId": 0,
5054
"commentStart": 6
5155
},
5256
"start": 0,
5357
"end": 11,
58+
"moduleId": 0,
5459
"commentStart": 0
5560
}

rust/kcl-lib/src/parsing/snapshots/kcl_lib__parsing__parser__snapshot_math_tests__f.snap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ expression: actual
1919
"raw": "1",
2020
"start": 0,
2121
"end": 1,
22+
"moduleId": 0,
2223
"commentStart": 0
2324
},
2425
"right": {
@@ -35,6 +36,7 @@ expression: actual
3536
"raw": "2",
3637
"start": 6,
3738
"end": 7,
39+
"moduleId": 0,
3840
"commentStart": 6
3941
},
4042
"right": {
@@ -47,14 +49,17 @@ expression: actual
4749
"raw": "3",
4850
"start": 10,
4951
"end": 11,
52+
"moduleId": 0,
5053
"commentStart": 10
5154
},
5255
"start": 6,
5356
"end": 11,
57+
"moduleId": 0,
5458
"commentStart": 6
5559
},
5660
"start": 0,
5761
"end": 11,
62+
"moduleId": 0,
5863
"commentStart": 0
5964
},
6065
"right": {
@@ -67,9 +72,11 @@ expression: actual
6772
"raw": "4",
6873
"start": 16,
6974
"end": 17,
75+
"moduleId": 0,
7076
"commentStart": 16
7177
},
7278
"start": 0,
7379
"end": 17,
80+
"moduleId": 0,
7481
"commentStart": 0
7582
}

rust/kcl-lib/src/parsing/snapshots/kcl_lib__parsing__parser__snapshot_math_tests__g.snap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ expression: actual
1515
"raw": "1",
1616
"start": 0,
1717
"end": 1,
18+
"moduleId": 0,
1819
"commentStart": 0
1920
},
2021
"right": {
@@ -35,6 +36,7 @@ expression: actual
3536
"raw": "2",
3637
"start": 6,
3738
"end": 7,
39+
"moduleId": 0,
3840
"commentStart": 6
3941
},
4042
"right": {
@@ -47,10 +49,12 @@ expression: actual
4749
"raw": "3",
4850
"start": 10,
4951
"end": 11,
52+
"moduleId": 0,
5053
"commentStart": 10
5154
},
5255
"start": 6,
5356
"end": 11,
57+
"moduleId": 0,
5458
"commentStart": 6
5559
},
5660
"right": {
@@ -63,13 +67,16 @@ expression: actual
6367
"raw": "4",
6468
"start": 16,
6569
"end": 17,
70+
"moduleId": 0,
6671
"commentStart": 16
6772
},
6873
"start": 6,
6974
"end": 17,
75+
"moduleId": 0,
7076
"commentStart": 6
7177
},
7278
"start": 0,
7379
"end": 17,
80+
"moduleId": 0,
7481
"commentStart": 0
7582
}

rust/kcl-lib/src/parsing/snapshots/kcl_lib__parsing__parser__snapshot_math_tests__h.snap

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ expression: actual
1515
"raw": "1",
1616
"start": 0,
1717
"end": 1,
18+
"moduleId": 0,
1819
"commentStart": 0
1920
},
2021
"right": {
@@ -39,6 +40,7 @@ expression: actual
3940
"raw": "2",
4041
"start": 7,
4142
"end": 8,
43+
"moduleId": 0,
4244
"commentStart": 7
4345
},
4446
"right": {
@@ -51,10 +53,12 @@ expression: actual
5153
"raw": "3",
5254
"start": 11,
5355
"end": 12,
56+
"moduleId": 0,
5457
"commentStart": 11
5558
},
5659
"start": 7,
5760
"end": 12,
61+
"moduleId": 0,
5862
"commentStart": 7
5963
},
6064
"right": {
@@ -67,10 +71,12 @@ expression: actual
6771
"raw": "4",
6872
"start": 17,
6973
"end": 18,
74+
"moduleId": 0,
7075
"commentStart": 17
7176
},
7277
"start": 7,
7378
"end": 18,
79+
"moduleId": 0,
7480
"commentStart": 7
7581
},
7682
"right": {
@@ -83,13 +89,16 @@ expression: actual
8389
"raw": "5",
8490
"start": 21,
8591
"end": 22,
92+
"moduleId": 0,
8693
"commentStart": 21
8794
},
8895
"start": 7,
8996
"end": 22,
97+
"moduleId": 0,
9098
"commentStart": 7
9199
},
92100
"start": 0,
93101
"end": 22,
102+
"moduleId": 0,
94103
"commentStart": 0
95104
}

0 commit comments

Comments
 (0)