tsrs 0.18.0-x86_64-linux-gnu → 0.20.0-x86_64-linux-gnu
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tsrs/3.2/tsrs.so +0 -0
- data/lib/tsrs/3.3/tsrs.so +0 -0
- data/lib/tsrs/3.4/tsrs.so +0 -0
- data/lib/tsrs/4.0/tsrs.so +0 -0
- data/lib/tsrs/version.rb +1 -1
- data/rust/.cargo/config.toml +1 -1
- data/rust/Cargo.lock +66 -62
- data/rust/Cargo.toml +9 -9
- data/rust/src/lib.rs +1 -1
- data/rust/src/session.rs +17 -10
- data/rust/src/status.rs +4 -4
- data/rust/src/transpile.rs +45 -15
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9a15c99904f60ad8809e1a12f32a3eccdaa65a2096adc459f69aa8c86974305f
|
|
4
|
+
data.tar.gz: 98f45b4148e5a59c6303080a12c9de399395483363b756b3e8e75da66c2fc6cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 845808ca7221f055d550fc88c87f6314d7d77711b103ecc78f590849d75c27a267931f5e1717a7df03aa4108f6cf1d0c97f65d7d7c10f3274a2468c199abf577
|
|
7
|
+
data.tar.gz: b9cf0647947a1ecd496c2de21fb669f57b76b509b9ff6a69d0af2821c73318ab8d3e2af98d8cb0461bef92296a4cd20d23adb628345f1ca4858ec05fc1c1d659
|
data/lib/tsrs/3.2/tsrs.so
CHANGED
|
Binary file
|
data/lib/tsrs/3.3/tsrs.so
CHANGED
|
Binary file
|
data/lib/tsrs/3.4/tsrs.so
CHANGED
|
Binary file
|
data/lib/tsrs/4.0/tsrs.so
CHANGED
|
Binary file
|
data/lib/tsrs/version.rb
CHANGED
data/rust/.cargo/config.toml
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
# The TypeScript version tsrs's release builds stamp (`nightly` in [workspace.metadata.typescript] of tsrs's
|
|
3
3
|
# Cargo.toml), so tsbuildinfo files and typesVersions matching agree with the tsrs npm package.
|
|
4
4
|
# See .github/workflows/upstream.yml.
|
|
5
|
-
TSRS_TS_VERSION = "7.1.0-
|
|
5
|
+
TSRS_TS_VERSION = "7.1.0-beta"
|
data/rust/Cargo.lock
CHANGED
|
@@ -697,8 +697,8 @@ dependencies = [
|
|
|
697
697
|
|
|
698
698
|
[[package]]
|
|
699
699
|
name = "tsrs_api"
|
|
700
|
-
version = "0.
|
|
701
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
700
|
+
version = "0.20.0"
|
|
701
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
702
702
|
dependencies = [
|
|
703
703
|
"rustc-hash",
|
|
704
704
|
"tsrs_api_codec",
|
|
@@ -709,6 +709,7 @@ dependencies = [
|
|
|
709
709
|
"tsrs_compiler",
|
|
710
710
|
"tsrs_core",
|
|
711
711
|
"tsrs_diagnostics",
|
|
712
|
+
"tsrs_execute",
|
|
712
713
|
"tsrs_ls",
|
|
713
714
|
"tsrs_lsproto",
|
|
714
715
|
"tsrs_module",
|
|
@@ -721,8 +722,8 @@ dependencies = [
|
|
|
721
722
|
|
|
722
723
|
[[package]]
|
|
723
724
|
name = "tsrs_api_codec"
|
|
724
|
-
version = "0.
|
|
725
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
725
|
+
version = "0.20.0"
|
|
726
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
726
727
|
dependencies = [
|
|
727
728
|
"rustc-hash",
|
|
728
729
|
"tsrs_ast",
|
|
@@ -731,8 +732,8 @@ dependencies = [
|
|
|
731
732
|
|
|
732
733
|
[[package]]
|
|
733
734
|
name = "tsrs_api_transport"
|
|
734
|
-
version = "0.
|
|
735
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
735
|
+
version = "0.20.0"
|
|
736
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
736
737
|
dependencies = [
|
|
737
738
|
"base64",
|
|
738
739
|
"rustc-hash",
|
|
@@ -740,12 +741,13 @@ dependencies = [
|
|
|
740
741
|
"serde_json",
|
|
741
742
|
"tsrs_core",
|
|
742
743
|
"tsrs_vfs",
|
|
744
|
+
"windows-sys",
|
|
743
745
|
]
|
|
744
746
|
|
|
745
747
|
[[package]]
|
|
746
748
|
name = "tsrs_ast"
|
|
747
|
-
version = "0.
|
|
748
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
749
|
+
version = "0.20.0"
|
|
750
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
749
751
|
dependencies = [
|
|
750
752
|
"bitflags",
|
|
751
753
|
"hashbrown",
|
|
@@ -758,8 +760,8 @@ dependencies = [
|
|
|
758
760
|
|
|
759
761
|
[[package]]
|
|
760
762
|
name = "tsrs_astnav"
|
|
761
|
-
version = "0.
|
|
762
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
763
|
+
version = "0.20.0"
|
|
764
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
763
765
|
dependencies = [
|
|
764
766
|
"tsrs_ast",
|
|
765
767
|
"tsrs_core",
|
|
@@ -768,8 +770,8 @@ dependencies = [
|
|
|
768
770
|
|
|
769
771
|
[[package]]
|
|
770
772
|
name = "tsrs_binder"
|
|
771
|
-
version = "0.
|
|
772
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
773
|
+
version = "0.20.0"
|
|
774
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
773
775
|
dependencies = [
|
|
774
776
|
"bitflags",
|
|
775
777
|
"rustc-hash",
|
|
@@ -781,12 +783,13 @@ dependencies = [
|
|
|
781
783
|
|
|
782
784
|
[[package]]
|
|
783
785
|
name = "tsrs_checker"
|
|
784
|
-
version = "0.
|
|
785
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
786
|
+
version = "0.20.0"
|
|
787
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
786
788
|
dependencies = [
|
|
787
789
|
"bitflags",
|
|
788
790
|
"hashbrown",
|
|
789
791
|
"rustc-hash",
|
|
792
|
+
"smallvec",
|
|
790
793
|
"tsrs_ast",
|
|
791
794
|
"tsrs_astnav",
|
|
792
795
|
"tsrs_binder",
|
|
@@ -804,8 +807,8 @@ dependencies = [
|
|
|
804
807
|
|
|
805
808
|
[[package]]
|
|
806
809
|
name = "tsrs_compiler"
|
|
807
|
-
version = "0.
|
|
808
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
810
|
+
version = "0.20.0"
|
|
811
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
809
812
|
dependencies = [
|
|
810
813
|
"rayon",
|
|
811
814
|
"rustc-hash",
|
|
@@ -830,8 +833,8 @@ dependencies = [
|
|
|
830
833
|
|
|
831
834
|
[[package]]
|
|
832
835
|
name = "tsrs_contentmapper"
|
|
833
|
-
version = "0.
|
|
834
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
836
|
+
version = "0.20.0"
|
|
837
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
835
838
|
dependencies = [
|
|
836
839
|
"rustc-hash",
|
|
837
840
|
"tsrs_ast",
|
|
@@ -846,8 +849,8 @@ dependencies = [
|
|
|
846
849
|
|
|
847
850
|
[[package]]
|
|
848
851
|
name = "tsrs_core"
|
|
849
|
-
version = "0.
|
|
850
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
852
|
+
version = "0.20.0"
|
|
853
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
851
854
|
dependencies = [
|
|
852
855
|
"dragonbox_ecma",
|
|
853
856
|
"hashbrown",
|
|
@@ -864,8 +867,8 @@ dependencies = [
|
|
|
864
867
|
|
|
865
868
|
[[package]]
|
|
866
869
|
name = "tsrs_declarations"
|
|
867
|
-
version = "0.
|
|
868
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
870
|
+
version = "0.20.0"
|
|
871
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
869
872
|
dependencies = [
|
|
870
873
|
"rustc-hash",
|
|
871
874
|
"tsrs_ast",
|
|
@@ -881,16 +884,16 @@ dependencies = [
|
|
|
881
884
|
|
|
882
885
|
[[package]]
|
|
883
886
|
name = "tsrs_diagnostics"
|
|
884
|
-
version = "0.
|
|
885
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
887
|
+
version = "0.20.0"
|
|
888
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
886
889
|
dependencies = [
|
|
887
890
|
"rustc-hash",
|
|
888
891
|
]
|
|
889
892
|
|
|
890
893
|
[[package]]
|
|
891
894
|
name = "tsrs_execute"
|
|
892
|
-
version = "0.
|
|
893
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
895
|
+
version = "0.20.0"
|
|
896
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
894
897
|
dependencies = [
|
|
895
898
|
"libc",
|
|
896
899
|
"rustc-hash",
|
|
@@ -908,8 +911,8 @@ dependencies = [
|
|
|
908
911
|
|
|
909
912
|
[[package]]
|
|
910
913
|
name = "tsrs_fswatch"
|
|
911
|
-
version = "0.
|
|
912
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
914
|
+
version = "0.20.0"
|
|
915
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
913
916
|
dependencies = [
|
|
914
917
|
"libc",
|
|
915
918
|
"rustc-hash",
|
|
@@ -918,8 +921,8 @@ dependencies = [
|
|
|
918
921
|
|
|
919
922
|
[[package]]
|
|
920
923
|
name = "tsrs_incremental"
|
|
921
|
-
version = "0.
|
|
922
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
924
|
+
version = "0.20.0"
|
|
925
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
923
926
|
dependencies = [
|
|
924
927
|
"bitflags",
|
|
925
928
|
"rayon",
|
|
@@ -939,8 +942,8 @@ dependencies = [
|
|
|
939
942
|
|
|
940
943
|
[[package]]
|
|
941
944
|
name = "tsrs_ipc"
|
|
942
|
-
version = "0.
|
|
943
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
945
|
+
version = "0.20.0"
|
|
946
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
944
947
|
dependencies = [
|
|
945
948
|
"rustc-hash",
|
|
946
949
|
"tsrs_core",
|
|
@@ -948,8 +951,8 @@ dependencies = [
|
|
|
948
951
|
|
|
949
952
|
[[package]]
|
|
950
953
|
name = "tsrs_ls"
|
|
951
|
-
version = "0.
|
|
952
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
954
|
+
version = "0.20.0"
|
|
955
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
953
956
|
dependencies = [
|
|
954
957
|
"bitflags",
|
|
955
958
|
"indexmap",
|
|
@@ -976,8 +979,8 @@ dependencies = [
|
|
|
976
979
|
|
|
977
980
|
[[package]]
|
|
978
981
|
name = "tsrs_lsproto"
|
|
979
|
-
version = "0.
|
|
980
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
982
|
+
version = "0.20.0"
|
|
983
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
981
984
|
dependencies = [
|
|
982
985
|
"rustc-hash",
|
|
983
986
|
"tsrs_core",
|
|
@@ -986,10 +989,11 @@ dependencies = [
|
|
|
986
989
|
|
|
987
990
|
[[package]]
|
|
988
991
|
name = "tsrs_module"
|
|
989
|
-
version = "0.
|
|
990
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
992
|
+
version = "0.20.0"
|
|
993
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
991
994
|
dependencies = [
|
|
992
995
|
"bitflags",
|
|
996
|
+
"hashbrown",
|
|
993
997
|
"rustc-hash",
|
|
994
998
|
"tsrs_ast",
|
|
995
999
|
"tsrs_core",
|
|
@@ -999,8 +1003,8 @@ dependencies = [
|
|
|
999
1003
|
|
|
1000
1004
|
[[package]]
|
|
1001
1005
|
name = "tsrs_modulespecifiers"
|
|
1002
|
-
version = "0.
|
|
1003
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
1006
|
+
version = "0.20.0"
|
|
1007
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
1004
1008
|
dependencies = [
|
|
1005
1009
|
"regex",
|
|
1006
1010
|
"rustc-hash",
|
|
@@ -1012,8 +1016,8 @@ dependencies = [
|
|
|
1012
1016
|
|
|
1013
1017
|
[[package]]
|
|
1014
1018
|
name = "tsrs_parser"
|
|
1015
|
-
version = "0.
|
|
1016
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
1019
|
+
version = "0.20.0"
|
|
1020
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
1017
1021
|
dependencies = [
|
|
1018
1022
|
"bitflags",
|
|
1019
1023
|
"rustc-hash",
|
|
@@ -1025,8 +1029,8 @@ dependencies = [
|
|
|
1025
1029
|
|
|
1026
1030
|
[[package]]
|
|
1027
1031
|
name = "tsrs_printer"
|
|
1028
|
-
version = "0.
|
|
1029
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
1032
|
+
version = "0.20.0"
|
|
1033
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
1030
1034
|
dependencies = [
|
|
1031
1035
|
"bitflags",
|
|
1032
1036
|
"rustc-hash",
|
|
@@ -1038,8 +1042,8 @@ dependencies = [
|
|
|
1038
1042
|
|
|
1039
1043
|
[[package]]
|
|
1040
1044
|
name = "tsrs_project"
|
|
1041
|
-
version = "0.
|
|
1042
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
1045
|
+
version = "0.20.0"
|
|
1046
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
1043
1047
|
dependencies = [
|
|
1044
1048
|
"rustc-hash",
|
|
1045
1049
|
"tsrs_ast",
|
|
@@ -1061,8 +1065,8 @@ dependencies = [
|
|
|
1061
1065
|
|
|
1062
1066
|
[[package]]
|
|
1063
1067
|
name = "tsrs_projectutil"
|
|
1064
|
-
version = "0.
|
|
1065
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
1068
|
+
version = "0.20.0"
|
|
1069
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
1066
1070
|
dependencies = [
|
|
1067
1071
|
"rustc-hash",
|
|
1068
1072
|
"tsrs_core",
|
|
@@ -1070,8 +1074,8 @@ dependencies = [
|
|
|
1070
1074
|
|
|
1071
1075
|
[[package]]
|
|
1072
1076
|
name = "tsrs_pseudochecker"
|
|
1073
|
-
version = "0.
|
|
1074
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
1077
|
+
version = "0.20.0"
|
|
1078
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
1075
1079
|
dependencies = [
|
|
1076
1080
|
"tsrs_ast",
|
|
1077
1081
|
"tsrs_core",
|
|
@@ -1079,8 +1083,8 @@ dependencies = [
|
|
|
1079
1083
|
|
|
1080
1084
|
[[package]]
|
|
1081
1085
|
name = "tsrs_scanner"
|
|
1082
|
-
version = "0.
|
|
1083
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
1086
|
+
version = "0.20.0"
|
|
1087
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
1084
1088
|
dependencies = [
|
|
1085
1089
|
"bitflags",
|
|
1086
1090
|
"memchr",
|
|
@@ -1092,8 +1096,8 @@ dependencies = [
|
|
|
1092
1096
|
|
|
1093
1097
|
[[package]]
|
|
1094
1098
|
name = "tsrs_sourcemap"
|
|
1095
|
-
version = "0.
|
|
1096
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
1099
|
+
version = "0.20.0"
|
|
1100
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
1097
1101
|
dependencies = [
|
|
1098
1102
|
"rustc-hash",
|
|
1099
1103
|
"tsrs_ast",
|
|
@@ -1103,8 +1107,8 @@ dependencies = [
|
|
|
1103
1107
|
|
|
1104
1108
|
[[package]]
|
|
1105
1109
|
name = "tsrs_spanmap"
|
|
1106
|
-
version = "0.
|
|
1107
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
1110
|
+
version = "0.20.0"
|
|
1111
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
1108
1112
|
dependencies = [
|
|
1109
1113
|
"bitflags",
|
|
1110
1114
|
"tsrs_core",
|
|
@@ -1112,8 +1116,8 @@ dependencies = [
|
|
|
1112
1116
|
|
|
1113
1117
|
[[package]]
|
|
1114
1118
|
name = "tsrs_transformers"
|
|
1115
|
-
version = "0.
|
|
1116
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
1119
|
+
version = "0.20.0"
|
|
1120
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
1117
1121
|
dependencies = [
|
|
1118
1122
|
"bitflags",
|
|
1119
1123
|
"rustc-hash",
|
|
@@ -1128,8 +1132,8 @@ dependencies = [
|
|
|
1128
1132
|
|
|
1129
1133
|
[[package]]
|
|
1130
1134
|
name = "tsrs_tsoptions"
|
|
1131
|
-
version = "0.
|
|
1132
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
1135
|
+
version = "0.20.0"
|
|
1136
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
1133
1137
|
dependencies = [
|
|
1134
1138
|
"rustc-hash",
|
|
1135
1139
|
"tsrs_ast",
|
|
@@ -1144,8 +1148,8 @@ dependencies = [
|
|
|
1144
1148
|
|
|
1145
1149
|
[[package]]
|
|
1146
1150
|
name = "tsrs_vfs"
|
|
1147
|
-
version = "0.
|
|
1148
|
-
source = "git+https://github.com/oxc-project/tsrs?tag=v0.
|
|
1151
|
+
version = "0.20.0"
|
|
1152
|
+
source = "git+https://github.com/oxc-project/tsrs?tag=v0.20.0#d197eeea709616d61930c2bd5eac048471e404b8"
|
|
1149
1153
|
dependencies = [
|
|
1150
1154
|
"bitflags",
|
|
1151
1155
|
"rayon",
|
data/rust/Cargo.toml
CHANGED
|
@@ -16,15 +16,15 @@ crate-type = ["cdylib", "staticlib", "rlib"]
|
|
|
16
16
|
|
|
17
17
|
# tsrs does not publish its crates, so they come from the release tag. See .github/workflows/upstream.yml.
|
|
18
18
|
[dependencies]
|
|
19
|
-
tsrs_api = { git = "https://github.com/oxc-project/tsrs", tag = "v0.
|
|
20
|
-
tsrs_ast = { git = "https://github.com/oxc-project/tsrs", tag = "v0.
|
|
21
|
-
tsrs_compiler = { git = "https://github.com/oxc-project/tsrs", tag = "v0.
|
|
22
|
-
tsrs_contentmapper = { git = "https://github.com/oxc-project/tsrs", tag = "v0.
|
|
23
|
-
tsrs_core = { git = "https://github.com/oxc-project/tsrs", tag = "v0.
|
|
24
|
-
tsrs_execute = { git = "https://github.com/oxc-project/tsrs", tag = "v0.
|
|
25
|
-
tsrs_project = { git = "https://github.com/oxc-project/tsrs", tag = "v0.
|
|
26
|
-
tsrs_tsoptions = { git = "https://github.com/oxc-project/tsrs", tag = "v0.
|
|
27
|
-
tsrs_vfs = { git = "https://github.com/oxc-project/tsrs", tag = "v0.
|
|
19
|
+
tsrs_api = { git = "https://github.com/oxc-project/tsrs", tag = "v0.20.0" }
|
|
20
|
+
tsrs_ast = { git = "https://github.com/oxc-project/tsrs", tag = "v0.20.0" }
|
|
21
|
+
tsrs_compiler = { git = "https://github.com/oxc-project/tsrs", tag = "v0.20.0" }
|
|
22
|
+
tsrs_contentmapper = { git = "https://github.com/oxc-project/tsrs", tag = "v0.20.0" }
|
|
23
|
+
tsrs_core = { git = "https://github.com/oxc-project/tsrs", tag = "v0.20.0" }
|
|
24
|
+
tsrs_execute = { git = "https://github.com/oxc-project/tsrs", tag = "v0.20.0" }
|
|
25
|
+
tsrs_project = { git = "https://github.com/oxc-project/tsrs", tag = "v0.20.0" }
|
|
26
|
+
tsrs_tsoptions = { git = "https://github.com/oxc-project/tsrs", tag = "v0.20.0" }
|
|
27
|
+
tsrs_vfs = { git = "https://github.com/oxc-project/tsrs", tag = "v0.20.0" }
|
|
28
28
|
serde = { version = "1", features = ["derive"] }
|
|
29
29
|
serde_json = "1"
|
|
30
30
|
|
data/rust/src/lib.rs
CHANGED
|
@@ -85,7 +85,7 @@ pub unsafe extern "C" fn tsrs_session_check(session: *const TsrsSession, options
|
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
let options = options.to_string();
|
|
88
|
-
let session = session.
|
|
88
|
+
let session = session.retain();
|
|
89
89
|
|
|
90
90
|
guard(move || worker::run(move || session::check(&session, &options)))
|
|
91
91
|
}
|
data/rust/src/session.rs
CHANGED
|
@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
|
|
|
4
4
|
use serde_json::value::RawValue;
|
|
5
5
|
use tsrs_api::{Handler, Response, Session, SessionOptions};
|
|
6
6
|
use tsrs_core::context::{with_checker_lifetime, CheckerLifetime, Context};
|
|
7
|
-
use tsrs_core::json::Value;
|
|
7
|
+
use tsrs_core::json::{JsonMap, Value};
|
|
8
8
|
use tsrs_core::tspath;
|
|
9
9
|
use tsrs_vfs::{bundled, osvfs, FS};
|
|
10
10
|
|
|
@@ -15,6 +15,7 @@ use crate::status::Status;
|
|
|
15
15
|
|
|
16
16
|
pub struct TsrsSession {
|
|
17
17
|
session: Arc<Session>,
|
|
18
|
+
current_directory: String,
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
#[derive(Deserialize)]
|
|
@@ -31,15 +32,19 @@ struct CheckPayload {
|
|
|
31
32
|
|
|
32
33
|
pub fn new(cwd: &str) -> TsrsSession {
|
|
33
34
|
let fs: Arc<dyn FS> = Arc::new(bundled::wrap_fs(osvfs::fs()));
|
|
35
|
+
let current_directory = tspath::normalize_path(cwd);
|
|
34
36
|
|
|
35
37
|
let session = Session::new(SessionOptions::new(
|
|
36
|
-
|
|
38
|
+
current_directory.clone(),
|
|
37
39
|
bundled::default_lib_path(),
|
|
38
40
|
fs,
|
|
39
41
|
false,
|
|
40
42
|
));
|
|
41
43
|
|
|
42
|
-
TsrsSession {
|
|
44
|
+
TsrsSession {
|
|
45
|
+
session,
|
|
46
|
+
current_directory,
|
|
47
|
+
}
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
impl TsrsSession {
|
|
@@ -50,6 +55,7 @@ impl TsrsSession {
|
|
|
50
55
|
pub fn retain(&self) -> TsrsSession {
|
|
51
56
|
TsrsSession {
|
|
52
57
|
session: self.session(),
|
|
58
|
+
current_directory: self.current_directory.clone(),
|
|
53
59
|
}
|
|
54
60
|
}
|
|
55
61
|
|
|
@@ -58,16 +64,17 @@ impl TsrsSession {
|
|
|
58
64
|
}
|
|
59
65
|
}
|
|
60
66
|
|
|
61
|
-
pub fn check(session: &
|
|
67
|
+
pub fn check(session: &TsrsSession, request_json: &str) -> TsrsResult {
|
|
62
68
|
let request: CheckRequest = match serde_json::from_str(request_json) {
|
|
63
69
|
Ok(request) => request,
|
|
64
70
|
Err(error) => return TsrsResult::error(TsrsErrorCode::Option, error.to_string()),
|
|
65
71
|
};
|
|
66
72
|
|
|
67
|
-
let project = tspath::get_normalized_absolute_path(&request.project, session.current_directory
|
|
73
|
+
let project = tspath::get_normalized_absolute_path(&request.project, &session.current_directory);
|
|
68
74
|
let params = object("openProjects", Value::Array(vec![Value::String(project.clone())]));
|
|
75
|
+
let session = session.session();
|
|
69
76
|
|
|
70
|
-
let created = match call(session, "createSnapshot", ¶ms) {
|
|
77
|
+
let created = match call(&session, "createSnapshot", ¶ms) {
|
|
71
78
|
Ok(created) => created,
|
|
72
79
|
Err(message) => return TsrsResult::error(TsrsErrorCode::Check, message),
|
|
73
80
|
};
|
|
@@ -76,9 +83,9 @@ pub fn check(session: &Session, request_json: &str) -> TsrsResult {
|
|
|
76
83
|
return TsrsResult::error(TsrsErrorCode::Internal, "createSnapshot returned no snapshot");
|
|
77
84
|
};
|
|
78
85
|
|
|
79
|
-
let outcome = diagnostics(session, snapshot, &created, &project);
|
|
86
|
+
let outcome = diagnostics(&session, snapshot, &created, &project);
|
|
80
87
|
|
|
81
|
-
let _ = call(session, "release", &object("snapshot", Value::Number(snapshot as f64)));
|
|
88
|
+
let _ = call(&session, "release", &object("snapshot", Value::Number(snapshot as f64)));
|
|
82
89
|
|
|
83
90
|
match outcome {
|
|
84
91
|
Ok((status, diagnostics)) => {
|
|
@@ -129,7 +136,7 @@ fn diagnostics(
|
|
|
129
136
|
let status = if all.is_empty() {
|
|
130
137
|
ExitStatus::Success
|
|
131
138
|
} else {
|
|
132
|
-
ExitStatus::
|
|
139
|
+
ExitStatus::DiagnosticsPresentOutputsGenerated
|
|
133
140
|
};
|
|
134
141
|
|
|
135
142
|
let responses = tsrs_api::diagnostics::diagnostic_responses(&all);
|
|
@@ -171,7 +178,7 @@ fn call(session: &Session, method: &str, params: &Value) -> Result<Value, String
|
|
|
171
178
|
}
|
|
172
179
|
|
|
173
180
|
fn object(key: &str, value: Value) -> Value {
|
|
174
|
-
let mut map =
|
|
181
|
+
let mut map = JsonMap::default();
|
|
175
182
|
|
|
176
183
|
map.insert(key.to_string(), value);
|
|
177
184
|
|
data/rust/src/status.rs
CHANGED
|
@@ -11,10 +11,10 @@ impl From<ExitStatus> for Status {
|
|
|
11
11
|
fn from(status: ExitStatus) -> Self {
|
|
12
12
|
let name = match status {
|
|
13
13
|
ExitStatus::Success => "success",
|
|
14
|
-
ExitStatus::
|
|
15
|
-
ExitStatus::
|
|
16
|
-
ExitStatus::
|
|
17
|
-
ExitStatus::
|
|
14
|
+
ExitStatus::DiagnosticsPresentOutputsSkipped => "diagnostics_present_outputs_skipped",
|
|
15
|
+
ExitStatus::DiagnosticsPresentOutputsGenerated => "diagnostics_present_outputs_generated",
|
|
16
|
+
ExitStatus::InvalidProjectOutputsSkipped => "invalid_project_outputs_skipped",
|
|
17
|
+
ExitStatus::ProjectReferenceCycleOutputsSkipped => "project_reference_cycle_outputs_skipped",
|
|
18
18
|
ExitStatus::NotImplemented => "not_implemented",
|
|
19
19
|
};
|
|
20
20
|
|
data/rust/src/transpile.rs
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
use serde::Deserialize;
|
|
1
2
|
use serde::Serialize;
|
|
2
3
|
use serde_json::value::RawValue;
|
|
4
|
+
use tsrs_api::{Handler, Response};
|
|
5
|
+
use tsrs_core::json::{JsonMap, Value};
|
|
3
6
|
|
|
4
7
|
use crate::options::{self, TranspileRequest};
|
|
5
8
|
use crate::result::{TsrsErrorCode, TsrsResult};
|
|
@@ -11,6 +14,14 @@ struct TranspilePayload {
|
|
|
11
14
|
diagnostics: Box<RawValue>,
|
|
12
15
|
}
|
|
13
16
|
|
|
17
|
+
#[derive(Deserialize)]
|
|
18
|
+
#[serde(rename_all = "camelCase")]
|
|
19
|
+
struct ApiTranspileResponse {
|
|
20
|
+
output_text: String,
|
|
21
|
+
source_map_text: Option<String>,
|
|
22
|
+
diagnostics: Option<Box<RawValue>>,
|
|
23
|
+
}
|
|
24
|
+
|
|
14
25
|
pub fn transpile(source: String, request_json: String, declaration: bool) -> TsrsResult {
|
|
15
26
|
let request: TranspileRequest = match serde_json::from_str(&request_json) {
|
|
16
27
|
Ok(request) => request,
|
|
@@ -35,28 +46,47 @@ fn run(source: &str, request: &TranspileRequest, declaration: bool) -> TsrsResul
|
|
|
35
46
|
Err(message) => return TsrsResult::error(TsrsErrorCode::Option, message),
|
|
36
47
|
};
|
|
37
48
|
|
|
38
|
-
let
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
&
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
let mut options = JsonMap::default();
|
|
50
|
+
options.insert(
|
|
51
|
+
"compilerOptions".to_string(),
|
|
52
|
+
tsrs_tsoptions::gojson::compiler_options_to_go_json(&compiler_options),
|
|
53
|
+
);
|
|
54
|
+
options.insert("fileName".to_string(), Value::String(request.file_name.clone()));
|
|
55
|
+
options.insert("reportDiagnostics".to_string(), Value::Bool(request.report_diagnostics));
|
|
56
|
+
|
|
57
|
+
let mut params = JsonMap::default();
|
|
58
|
+
params.insert("input".to_string(), Value::String(source.to_string()));
|
|
59
|
+
params.insert("options".to_string(), Value::Object(options));
|
|
60
|
+
let params = match tsrs_core::json::marshal(&Value::Object(params)) {
|
|
61
|
+
Ok(params) => params,
|
|
62
|
+
Err(error) => return TsrsResult::error(TsrsErrorCode::Internal, error),
|
|
47
63
|
};
|
|
48
64
|
|
|
49
|
-
let
|
|
65
|
+
let session = crate::session::new("/").session();
|
|
66
|
+
let method = if declaration {
|
|
67
|
+
"transpileDeclaration"
|
|
68
|
+
} else {
|
|
69
|
+
"transpileModule"
|
|
70
|
+
};
|
|
71
|
+
let response = match session.handle_request(method, params.as_bytes()) {
|
|
72
|
+
Ok(Response::Json(response)) => response,
|
|
73
|
+
Ok(Response::Binary(_)) => {
|
|
74
|
+
return TsrsResult::error(TsrsErrorCode::Internal, "transpilation returned a binary response");
|
|
75
|
+
}
|
|
76
|
+
Err(error) => return TsrsResult::error(TsrsErrorCode::Transpile, error.to_string()),
|
|
77
|
+
};
|
|
50
78
|
|
|
51
|
-
let
|
|
52
|
-
Ok(
|
|
53
|
-
|
|
79
|
+
let output: ApiTranspileResponse = match serde_json::from_str(&response) {
|
|
80
|
+
Ok(output) => output,
|
|
81
|
+
Err(error) => return TsrsResult::error(TsrsErrorCode::Internal, error.to_string()),
|
|
54
82
|
};
|
|
55
83
|
|
|
56
84
|
let payload = TranspilePayload {
|
|
57
85
|
code: output.output_text,
|
|
58
|
-
map:
|
|
59
|
-
diagnostics
|
|
86
|
+
map: output.source_map_text.filter(|map| !map.is_empty()),
|
|
87
|
+
diagnostics: output
|
|
88
|
+
.diagnostics
|
|
89
|
+
.unwrap_or_else(|| RawValue::from_string("[]".to_string()).expect("a valid empty JSON array")),
|
|
60
90
|
};
|
|
61
91
|
|
|
62
92
|
match serde_json::to_string(&payload) {
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tsrs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.20.0
|
|
5
5
|
platform: x86_64-linux-gnu
|
|
6
6
|
authors:
|
|
7
7
|
- Marco Roth
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Ruby bindings for tsrs, a drop-in replacement for the TypeScript 7 compiler
|
|
14
14
|
and language server, written in Rust.
|