mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-05 04:58:57 +00:00
[TS] Fix relative import paths of generated TypeScript code (#8880)
* Refactor logic that generates import paths in AddImport
* Add new tests to validate relative import path fix
* Generate goldens
* Generate example code
* Format TS generator file
* Revert "Format TS generator file"
This reverts commit 0f0b24aee9.
* Fix merge conflicts
---------
Co-authored-by: Björn Harrtell <bjornharrtell@users.noreply.github.com>
This commit is contained in:
@@ -199,6 +199,20 @@ 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(["tsc"])
|
||||
print(
|
||||
@@ -215,6 +229,7 @@ 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...")
|
||||
|
||||
Reference in New Issue
Block a user