summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBjörn Harrtell <bjornharrtell@users.noreply.github.com>2022-09-13 05:03:23 +0200
committerGitHub <noreply@github.com>2022-09-12 20:03:23 -0700
commit4fca4dc60c203f7949384f9fbf7c2f3654cc473d (patch)
treecbd35d435a6e68815bb86c253a317c69d61d76bd /scripts
parent036032373bada5271f1a2cdb8ef31f474b3cf908 (diff)
downloadflatbuffers-4fca4dc60c203f7949384f9fbf7c2f3654cc473d.tar.gz
flatbuffers-4fca4dc60c203f7949384f9fbf7c2f3654cc473d.tar.bz2
flatbuffers-4fca4dc60c203f7949384f9fbf7c2f3654cc473d.zip
[TS/JS] Move TS tests to dedicated folder and deps upgrade (#7508)
* Move TS tests to dedicated folder and deps upgrade * Attempt to fix generate_code * Fix dir on CI * Add js extension * Fix missing extension * Harmonize with test gen * Unexplained code gen change * Restore yarn.lock * Naive attempt to fix bazel stuff * Pin @bazel/typescript to 5.2.0 * Attempt to fix bazel * More tweak * Upgrade deps * Tweak? * Fix path * Fix test package Co-authored-by: Derek Bailey <derekbailey@google.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generate_code.py25
1 files changed, 21 insertions, 4 deletions
diff --git a/scripts/generate_code.py b/scripts/generate_code.py
index 74328024..7111d8d3 100755
--- a/scripts/generate_code.py
+++ b/scripts/generate_code.py
@@ -165,7 +165,6 @@ flatc(
NO_INCL_OPTS
+ CPP_OPTS
+ CS_OPTS
- + TS_OPTS
+ [
"--binary",
"--java",
@@ -181,6 +180,15 @@ flatc(
)
flatc(
+ NO_INCL_OPTS
+ + TS_OPTS,
+ schema="monster_test.fbs",
+ prefix="ts",
+ include="include_test",
+ data="monsterdata_test.json",
+)
+
+flatc(
["--lua", "--bfbs-filenames", str(tests_path)],
schema="monster_test.fbs",
include="include_test",
@@ -235,14 +243,21 @@ flatc(
)
flatc(
- BASE_OPTS + CPP_OPTS + CS_OPTS + TS_OPTS + JAVA_OPTS + KOTLIN_OPTS + PHP_OPTS,
+ BASE_OPTS + CPP_OPTS + CS_OPTS + JAVA_OPTS + KOTLIN_OPTS + PHP_OPTS,
prefix="union_vector",
schema="union_vector/union_vector.fbs",
)
flatc(
+ BASE_OPTS + TS_OPTS,
+ prefix="ts/union_vector",
+ schema="union_vector/union_vector.fbs",
+)
+
+flatc(
BASE_OPTS + TS_OPTS + ["--gen-name-strings", "--gen-mutable"],
include="include_test",
+ prefix="ts",
schema="monster_test.fbs",
)
@@ -257,13 +272,14 @@ flatc(
flatc(
BASE_OPTS + TS_OPTS + ["-b"],
include="include_test",
+ prefix="ts",
schema="monster_test.fbs",
data="unicode_test.json",
)
flatc(
BASE_OPTS + TS_OPTS + ["--gen-name-strings"],
- prefix="union_vector",
+ prefix="ts/union_vector",
schema="union_vector/union_vector.fbs",
)
@@ -357,7 +373,8 @@ flatc(
# Optional Scalars
optional_scalars_schema = "optional_scalars.fbs"
-flatc(["--java", "--kotlin", "--lobster", "--ts"], schema=optional_scalars_schema)
+flatc(["--java", "--kotlin", "--lobster"], schema=optional_scalars_schema)
+flatc(TS_OPTS, schema=optional_scalars_schema, prefix="ts")
flatc(["--csharp", "--python", "--gen-object-api"], schema=optional_scalars_schema)