This commit is contained in:
2026-08-17 01:21:55 +02:00
parent 5761d6e67a
commit 4bd1e24e75
265 changed files with 20617 additions and 24457 deletions
+9 -32
View File
@@ -62,10 +62,16 @@ def flatc(
# Execute esbuild with the specified parameters
def esbuild(input, output):
cmd = ["../../node_modules/.bin/esbuild", input, "--outfile=" + output]
cmd = ["esbuild", input, "--outfile=" + output]
cmd += ["--format=cjs", "--bundle", "--external:flatbuffers"]
check_call(cmd)
print("Removing node_modules/ directory...")
shutil.rmtree(Path(tests_path, "node_modules"), ignore_errors=True)
check_call(["npm", "install", "--silent"])
flatc(
options=[
"--ts",
@@ -81,20 +87,6 @@ flatc(
)
esbuild("monster_test.ts", "monster_test_generated.cjs")
flatc(
options=[
"--ts",
"--reflect-names",
"--gen-name-strings",
"--gen-mutable",
"--gen-object-api",
"--ts-entry-points",
"--ts-flat-files",
],
schema="../even_more_defaults.fbs",
include="../include_test",
)
flatc(
options=["--gen-object-api", "-b"],
schema="../monster_test.fbs",
@@ -207,27 +199,13 @@ flatc(
flatc(options=["--ts"], schema="../long_namespace.fbs")
flatc(options=["--ts"], schema="../longer_namespace.fbs")
flatc(
options=[
"--ts",
"--reflect-names",
"--gen-name-strings",
"--gen-object-api",
"--ts-entry-points",
"--ts-flat-files",
],
schema="relative_imports/relative_imports.fbs",
prefix="relative_imports",
)
print("Running TypeScript Compiler...")
check_call(["../../node_modules/.bin/tsc"])
check_call(["tsc"])
print(
"Running TypeScript Compiler in old node resolution mode for"
" no_import_ext..."
)
check_call(["../../node_modules/.bin/tsc", "-p", "./tsconfig.node.json"])
check_call(["tsc", "-p", "./tsconfig.node.json"])
NODE_CMD = ["node"]
@@ -237,7 +215,6 @@ check_call(NODE_CMD + ["JavaScriptUnionVectorTest"])
check_call(NODE_CMD + ["JavaScriptFlexBuffersTest"])
check_call(NODE_CMD + ["JavaScriptComplexArraysTest"])
check_call(NODE_CMD + ["JavaScriptUnionUnderlyingTypeTest"])
check_call(NODE_CMD + ["JavaScriptRelativeImportPathTest"])
check_call(NODE_CMD + ["JavaScriptUndefinedForOptionals"])
print("Running old v1 TypeScript Tests...")